difference between overall code and new code in sonarqube - sonarqube

I am new to sonarqube and I don't understand how it works.
I have downloaded the latest sonarqube image, I run a simple container and the application starts, everything ok. Community Edition Version 9.9
I have a simple python program and I scan it with the following command:
sonar-scanner.bat -D"sonar.projectKey=test" -D"sonar.host.url=http://localhost:9000" -D"sonar.login=MY_TOKEN" -D"sonar.python.version=3"
In the first scan the new code tab contains no information and in the overall tab everything is perfect, without any error.
I enter 1 smell code and launch the scan. The new code tab shows 1 smell code and the overall tab shows the same information. I think that everything is correct.
I enter another smell code and launch another scan. The new code tab shows 2 smell codes and the overall tab shows the same information.
If it shows the same information, what is the difference between them?
Shouldn't the second scan show only 1 smell code in new code tab and 2 smell code in overall code tab, why doesn't it happen like that?
Why is the scan not done against the latest version?
thank you in advance

Related

Xcode & Playground not displaying results window

I am fairly new to programming, so I admit I have a lot to learn. In earlier versions of Xcode and Playground, I used to see the results as I typed a program. For example when typing
var str = "Hello, playground" on the far right (results window) I would see: Hello, playground. I also had typed up part of a program with a function and if I entered values for variables, it would calculate the result in the result window (on the right). At some point in typing program, it stopped showing this.
I was hoping that someone would be able to assist me in figuring out what happened. I am thinking that with trying to learn the new Mac (I have always used a PC in the past) that I may have pressed some buttons somewhere that I should not have....OR the newest updates took away the function somehow? Here is what I have done:
-closed the application and restarted
-restarted the computer
-tried checking setting, but I am not too sure what to look for...
-called for support but they don't seem too sure either..
-installed the newest version available of Xcode (Xcode 7 beta) and rebooted
Does anyone have any suggestions?
Thanks
I think this might be broken in 7B4, it is for me. I can see a thread on devforums for this, but when I clicked the link, it redirected me to a create-account page and would not let me in. When I tried to search for it from my account, I did not see it in the list.
See the thread shown in this (admittedly transient) search:
https://www.google.com/search?q=xcode+playground+not+showing+results&ie=utf-8&oe=utf-8
Particularly, this result:
Playground not displaying output | Apple Developer Forums
https://forums.developer.apple.com/thread/3672 Jun 9, 2015 - This
checks to see if the playground is operational. If it does not echo to
the results sidebar, try quitting and restarting Xcode. If you're
still not ...

No 'Code Coverage' decorations in SonarQube 5.1+

I've installed SonarQube 5.1 (and now 5.1.1 as a desperate move) on a Redhat 6 but I can't see any code-coverage decorations in the files itself. I've successfully did en maven-jacoco-sonar-build and I can see everything in Sonarqube (even the code coverage percentages per package/file) but when I view the files itself there are no red/green lines present.
Things I've checked/done so far:
I'm logged in as administrator
I did an API call coverage/show?from=1&to=100&key=... and I see the lines, in the resultset, that are covered (the second argument in every element). The data is clearly present in the database.
I've checked the permissions in "Security", specifically the 'Project Settings' (because I've encountered quite a few google hits with bugs in that area) and "Anyone,..." has the proper permissions to "Browse" en "See Source code"
When I look at the source code of the page I see clearly a div for the scm/duplication-check/... but there are no for "coverage". It seems like Sonarqube comes up empty when it searches for coverage.
Has anyone an idea how to fix this?
It looks like your Elasticsearch cache is corrupted or at least not up-to-date.
To fix this:
Stop SQ
Delete the <install_dir>/data/es folder
Restart SQ

How to debug Dojo in browser?

I'm currently (trying) to develop an app with Worklight Studio 5.0.6 and Dojo (Mobile) 1.8.3. I have a really hard time to to find a proper method for debugging. After waiting 5-10 minutes for the build an deploy-process on the server, an error usually looks like this in the Chrome debugger:
How am I supposed to track down this error in MY source? The whole stack trace consists entirely of Dojo code which generates an absolutely useless error message after 20 abstraction layers.
Seriously, how do you guys handle this in real life? What methods do you use for debugging Dojo-driven apps in the browser?
spyro
For dojo.parse errors, I find it useful to pause the Chrome debugger on all exceptions (the purple icon on your screenshot, should be blue). You usally get more details about the cause of the error, the name of the DOM node being parsed, etc. in the first exception being raised.
RĂ©mi.
Debugging dojo based application should be the same as debugging any javascript application.
Usually I will follow these steps:
add console.log() somewhere in code: this is fast and most of time this is enough.
set breakpoint in debugger: if step 1 is not enough, you can base on error information to set breakpoint before error line, then step in or step out.
comment out recently changes: for some error which is hard to find the error line, for example, parse error in your case, the good way is comment out your recently changes one by one till back to your last working version. Or, return to your last working version, then add code back one by one.
Create a simple application to reproduce the error : if your application is very complicate and it is hard for you to follow above methods, you can try to create a new application which mimics your current application but with simple logics and try to reproduce the error.
Based on experience : Some errors, for example, extra ',' in the end of array which works at chrome and firefox, will report a nonsense error information at IE. Debug these kinds of errors is very difficult, you can base on your experience or do a google search.
Did you provide isDebug: true in your dojoConfig? Also, try to see if the same occurs in other browsers.
Update: I recently discovered that there are issues with Google Chrome and Dojo debugging and I think it has to do with the asynchronous loading of files. As you can see in the provided screenshot of #spyro, the ReferenceError object is blank (which you can notice because of the empty brackets {}). If you want to solve that, reopen the console of Google Chrome, (for example by tapping F12 twice). After reopening the ReferenceError should not be empty anymore and now you can expand that object by using the arrow next to it and get a more detailed message about what failed.
Usually what I do in situations like that is to place a breakpoint inside the error callback (line 3398 in your case) and then look into the error variable ("e").
I am not sure how familiar you are with the Web Inspector, but once you hit the breakpoint open the Web Inspector 'console' and check for the error properties "e.message" and "e.stack" (just type in "e.message " in the console).
Also, during development it is better to avoid Dojo optimization / minification, which greatly improve your debug-ability.
Bottom line is to try to place the breakpoint before the error is thrown.

Ok - I am baffled with my automation - what's going on

So there are two things going on which I have no clue and if someone can help that would be awesome.
I am doing automation using Selenium WebDriver in conjunction with VS2010 (C#) and I am using the PageObject pattern, which has really been helpful in constructed clean, organized code. Anyway, here are my two issues:
When I Debug my code the automation runs perfectly with the desired results at the end. But when I enter a breakpoint and step into the code, it gives me an error message stating "There is no source available - There is no source code available for the current location" Then the message looks like it is looking in my directory for a particular class file and it gives me a bunch of error messages and the last line says: The debugger could not locate the source file c:\Projects\WebDriver\trunk\dotnet\src\WebDriver.Support\PageObjects\WebElementProxy.cs.
Again when I run through the program with no breakpoints it's fine. But once I enter a breakpoint and step into the code, it gives me that error like it's looking for a particular class. I have all .dlls referenced to the project so I am not sure what is going on there.
When I run the code in Chrome, everything seems to work fine. But when I try to run it using FireFox, it cannot seem to locate the first button. I have my code set up as:
//Get A Quote Button Control by ID
[FindsBy(How = How.Id, Using = "bt_ContinueWelcome")]
[CacheLookup]
public IWebElement GetAQuoteButtonId;
So Chrome will read it fine but not FireFox, and I have not tried IE.
Any help for the above would be greatly appreciated. I want to start inserting validation but I need to get over these hurdles first - thank you

No data in the Test Plan Progress Report in TFS

I'm having some problems with the Test Plan Progress Report in TFS. It is not showing any data in there, even when i have several test cases and in different states, and also have assigned a Configuration (Windows 7 and IE9) to each test case. Do you know what else could be causing this annoying issue with the report?
The Test Case Readiness Report is working fine, but only this one is not working.
I met the same problem. After taking a lot of time in google or microsoft's website , there is still no answer be found. I decide to research the report design. It still take a lot of time since this is my first time to use SQL Server Report Builder.
I found the solution to this problem.
Open this report in report builder
go to DataSet > dsTestData
right click mouse > dataset properties
select field in left column
click 'fx' button of Passed_Cumulative_Count
change expression's variable :
change OutcomeCaption.Value="Passed" to Outcome_Id.Value="2"
change other fields as step 6
Outcome_Id :
1 Other
2 Passed
3 Failed
7 Blocked
255 Never Run
Save your report
You should see test plan progress data now .
My TFS is in Traditional Chinese OS , the OutcomeCaption will be chinese word. This is why the orginal report has no data.
Hope this gives others some help.
I had a similar issue and it turned out it was because I didn't have Test Plans defined. Since I wasn't using a version of Visual Studio that had Microsoft Test Manager licensed, I wasn't able to define a Test Plan for my Test Cases.

Resources