Issue With Oracle 12c Installation - windows

I'm running Windows 10 Pro fresh after a computer restore, so it's been factory reset.
I download the Oracle package and extract all the files and run the setup file and the program just quits on its own running the Prerequisite check with no error diaglogues or anything
Log file is too large to attach but I don't see any "FAILURE" and the last few lines of file look like this:
*********************************************
INFO: Physical Memory: This is a prerequisite condition to test whether the system has at least 1GB (1048576.0KB) of total physical memory.
INFO: Severity:IGNORABLE
INFO: OverallStatus:SUCCESSFUL
INFO: -----------------------------------------------
INFO: Verification Result for Node:laptop-8gmvgrg9
INFO: Expected Value:1GB (1048576.0KB)
INFO: Actual Value:15.8406GB (1.661008E7KB)
INFO: -----------------------------------------------
INFO: *********************************************
INFO: Available Physical Memory: This is a prerequisite condition to test whether the system has at least 50MB (51200.0KB) of available physical memory.
INFO: Severity:IGNORABLE
INFO: OverallStatus:SUCCESSFUL
INFO: -----------------------------------------------
INFO: Verification Result for Node:laptop-8gmvgrg9
INFO: Expected Value:50MB (51200.0KB)
INFO: Actual Value:11.6503GB (1.2216188E7KB)
INFO: -----------------------------------------------
INFO: *********************************************
INFO: Swap Size: This is a prerequisite condition to test whether sufficient total swap space is available on the system.
INFO: Severity:IGNORABLE
INFO: OverallStatus:SUCCESSFUL
INFO: -----------------------------------------------
INFO: Verification Result for Node:laptop-8gmvgrg9
INFO: Expected Value:15.8406GB (1.661008E7KB)
INFO: Actual Value:18.7156GB (1.9624736E7KB)
INFO: -----------------------------------------------
INFO: *********************************************
INFO: Free Space: laptop-8gmvgrg9:C:\Users\shopp\AppData\Local\Temp: This is a prerequisite condition to test whether sufficient free space is available in the file system.
INFO: Severity:IGNORABLE
INFO: OverallStatus:SUCCESSFUL
INFO: -----------------------------------------------
INFO: Verification Result for Node:laptop-8gmvgrg9
INFO: Expected Value:500MB
INFO: Actual Value:393.6558GB
INFO: -----------------------------------------------
INFO: *********************************************
INFO: Architecture: This is a prerequisite condition to test whether the system has a certified architecture.
INFO: Severity:CRITICAL
INFO: OverallStatus:SUCCESSFUL
INFO: -----------------------------------------------
INFO: Verification Result for Node:laptop-8gmvgrg9
INFO: Expected Value:64-bit
INFO: Actual Value:64-bit
INFO: -----------------------------------------------
I'm generally a Linux user and have no familiarity with Windows -- could anyone help me figure out what my problems are?

Related

Cppcheck errors are not getting reported in SonarQube 7.9.5 using Sonar-cxx community plugin v1.3.3

I am having SonarQube Community Edition (v7.9.5) server running with sonar-cxx community plugin v1.3.3
Now for a test C++ project, I have generated cppcheck (v2.3) analysis report and ran sonar-scanner (https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.5.0.2216-linux.zip) as follows.
$ pwd
/testproj
$ ls
file1.cc
$ cat file1.cc
int main()
{
char a[10];
a[10] = 0;
return 0;
}
$ cppcheck --enable=all --xml . 2> cppcheck_issues.xml
$ cat cppcheck_issues.xml
<?xml version="1.0" encoding="UTF-8"?>
<results version="2">
<cppcheck version="2.3"/>
<errors>
<error id="arrayIndexOutOfBounds" severity="error" msg="Array &apos;a[10]&apos; accessed at index 10, which is out of bounds." verbose="Array &apos;a[10]&apos; accessed at index 10, which is out of bounds." cwe="788" hash="11923574308940205340">
<location file="file1.cc" line="4" column="2" info="Array index out of bounds"/>
</error>
<error id="unreadVariable" severity="style" msg="Variable &apos;a[10]&apos; is assigned a value that is never used." verbose="Variable &apos;a[10]&apos; is assigned a value that is never used." cwe="563" hash="9507758794529763218">
<location file="file1.cc" line="4" column="7"/>
<symbol>a[10]</symbol>
</error>
</errors>
</results>
$ sonar-scanner \
-Dsonar.host.url=<sonar-host-url>\
-Dsonar.login=<sonar-token>\
-Dsonar.projectName=testproj\
-Dsonar.projectKey=testproj\
-Dsonar.projectVersion=0.1\
-Dsonar.cxx.cppcheck.reportPath=cppcheck_issues.xml\
-Dsonar.exclusions=cppcheck_issues.xml
INFO: Scanner configuration file: /code/sonar-scanner/conf/sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarScanner 4.5.0.2216
INFO: Java 11.0.3 AdoptOpenJDK (64-bit)
INFO: Linux 4.1.12-124.43.4.el7uek.x86_64 amd64
INFO: User cache: /root/.sonar/cache
INFO: Scanner configuration file: /code/sonar-scanner/conf/sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: Analyzing on SonarQube server 7.9.5
INFO: Default locale: "en_US", source code encoding: "UTF-8" (analysis is platform dependent)
INFO: Load global settings
INFO: Load global settings (done) | time=142ms
INFO: Server id: 22633092-AXeMotAnTu7ckErSxqZC
INFO: User cache: /root/.sonar/cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=73ms
INFO: Load/download plugins (done) | time=141ms
INFO: Process project properties
INFO: Execute project builders
INFO: Execute project builders (done) | time=9ms
INFO: Project key: testproj
INFO: Base dir: /testproj
INFO: Working dir: /testproj/.scannerwork
INFO: Load project settings for component key: 'testproj'
INFO: Load project settings for component key: 'testproj' (done) | time=74ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=99ms
INFO: Load active rules
INFO: Load active rules (done) | time=1167ms
WARN: SCM provider autodetection failed. Please use "sonar.scm.provider" to define SCM of your project, or disable the SCM Sensor in the project settings.
INFO: Indexing files...
INFO: Project configuration:
INFO: Excluded sources: cppcheck_issues.xml
INFO: 1 file indexed
INFO: 0 files ignored because of inclusion/exclusion patterns
INFO: Quality profile for c++: Sonar way
INFO: ------------- Run sensors on module testproj
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=41ms
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by net.sf.cglib.core.ReflectUtils$1 (file:/root/.sonar/cache/866bb1adbf016ea515620f1aaa15ec53/sonar-javascript-plugin.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of net.sf.cglib.core.ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
INFO: Sensor C++ (Community) SquidSensor [cxx]
INFO: Load project repositories
INFO: Load project repositories (done) | time=31ms
INFO: Sensor C++ (Community) SquidSensor [cxx] (done) | time=312ms
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=9ms
INFO: Sensor JavaXmlSensor [java]
INFO: Sensor JavaXmlSensor [java] (done) | time=3ms
INFO: Sensor HTML [web]
INFO: Sensor HTML [web] (done) | time=23ms
INFO: ------------- Run sensors on project
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=27ms
INFO: No SCM system was detected. You can use the 'sonar.scm.provider' property to explicitly specify it.
INFO: 1 file had no CPD blocks
INFO: Calculating CPD for 0 files
INFO: CPD calculation finished
INFO: Analysis report generated in 157ms, dir size=79 KB
INFO: Analysis report compressed in 22ms, zip size=12 KB
INFO: Analysis report uploaded in 58ms
INFO: ANALYSIS SUCCESSFUL, you can browse <sonar-host-url>/dashboard?id=testproj
INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
INFO: More about the report processing at <sonar-host-url>/api/ce/task?id=AXeQLS1KTu7ckErSxt5M
INFO: Executing post-job 'Final report'
INFO: Turn debug info on to get more details (sonar-scanner -X -Dsonar.verbose=true ...).
INFO: Analysis total time: 5.510 s
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 7.283s
INFO: Final Memory: 12M/44M
INFO: ------------------------------------------------------------------------
Now the project is successfully created/updated in SonarQube; but, the issues are not reported in SonarQube. Someone would be able to suggest on what could be the reason?
Please refer the snapshot of the project in SonarQube
Note-1: sonar.cxx.suffixes.sources is configured to ".cc" value for C++ (Community) plugin in SonarQube server configuration. And, there are no other plugin seen present with the same configuration key.
Note-2: There are no errors/warnings seen in ce.log
The issue cause is found after doing some more digging.
Issue cause: The default quality profile corresponding to the C++ (Community) had their all rules disabled by default, and there was no option to enable them as well.
Fix: Created a new quality profile extending the default one, then enabled rules for that, and finally made it as the default quality profile for C++ (Community) solves the issue.
Update (16-Feb-'21): Got a clarification from sonar-cxx team that this is intentional as well, and the same is documented in https://github.com/SonarOpenCommunity/sonar-cxx/wiki/Manage-Quality-Profiles
Since the cxx plugin contains a large number of sensors with over 4000
rules, all rules are initially deactivated in the default profile
Sonar way for the programming language CXX. Enabling all rules would
have a negative impact on the analysis performance and mostly only a
subset is needed.
Therefore, after installation, no sensor issues are displayed. To
display issues, the corresponding rules must first be enabled in the
Quality Profile being used by the project.

SonarQube scan runs but doesn’t generate any results

I’m running a SonarQube scan for the first time. It’s the CE version, 8.3.1.
I have SQ running on a server at 192.168.56.111. My development workstation is on 192.168.0.11. There are no network problems.
Since I’m new to SQ, I’m trying to keep it as basic as possible. I’m using the sample HelloWorld in https://github.com/SonarSource/sonar-scanning-examples/blob/master/sonarqube-scanner-maven/maven-basic/src/main/java/com/acme/basic/
I’m not using Git. Just saving the HelloWorld project to the local hard drive
The source code is at /opt/workspace/eclipse/java/my-app/src/main/java/com/mycompany/app/
The scanner is at /opt/sonarqube/scanner/sonar-scanner-4.4.0.2170-linux/bin
Here’s a copy of the properties file. I’m using the same file whether or not I put it in the scanner’s conf directory or the application workspace… I’ve seen different webpages that say it goes in either spot:
sonar.host.url=http://192.168.56.111:9000
sonar.sourceEncoding=UTF-8
sonar.projectKey=com.mycompany.app:my-app
sonar.scm.disabled=True
sonar.sources=/opt/workspace/eclipse/java/my-app/src/main/java/com/mycompany/app
sonar.login=73a9a7ab66a335d0d83aee813d576e184934a336
When I run sonar-scanner and then go check the results, Projects | Name | Overview, it says "The main branch has no lines of code".
Question #1: If sonar.scm.disabled=True is in the props file, how can this error happen? I also went to the project settings in the SQ server and disabled the SCM sensor there too. Same results.
Question #2: I noticed in the terminal output, it said .java files are being ignored. So I changed the sonar.sources property to where the class files are at: /opt/workspace/eclipse/java/my-app/target/classes/com/mycompany/app/. Same results. What should the sonar.sources property be? Does SQ work on the java files or the class files?
The results say “No Issues. Hooray!”. So I added this but of ugliness to the sayHello method in the HelloWorld class:
KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA");
kpg.initialize(1024);
Question #3: Still no code issues. SQ should have flagged on the 1024 (as it’s less than 2048) size right?
==== Edit 23 August ====
Adding output from the terminal per #HernánAlarcón 's comment.
INFO: Scanner configuration file: /opt/sonarqube/scanner/sonar-scanner-4.4.0.2170-linux/conf/sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarScanner 4.4.0.2170
INFO: Java 11.0.3 AdoptOpenJDK (64-bit)
INFO: Linux 3.10.0-1127.10.1.el7.x86_64 amd64
INFO: User cache: /home/dogzilla/.sonar/cache
INFO: Scanner configuration file: /opt/sonarqube/scanner/sonar-scanner-4.4.0.2170-linux/conf/sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: Analyzing on SonarQube server 8.3.1
INFO: Default locale: "en_US", source code encoding: "UTF-8"
INFO: Load global settings
INFO: Load global settings (done) | time=69ms
INFO: Server id: A7EE8CF2-AXMiwj91ZEnoz7IhXD_G
INFO: User cache: /home/dogzilla/.sonar/cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=36ms
INFO: Load/download plugins (done) | time=86ms
INFO: Process project properties
INFO: Process project properties (done) | time=7ms
INFO: Execute project builders
INFO: Execute project builders (done) | time=3ms
INFO: Project key: com.mycompany.app:my-app
INFO: Base dir: /opt/workspace/eclipse/java/my-app/target/classes/com/mycompany/app
INFO: Working dir: /opt/workspace/eclipse/java/my-app/target/classes/com/mycompany/app/.scannerwork
INFO: Load project settings for component key: 'com.mycompany.app:my-app'
INFO: Load project settings for component key: 'com.mycompany.app:my-app' (done) | time=17ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=40ms
INFO: Load active rules
INFO: Load active rules (done) | time=851ms
INFO: Indexing files...
INFO: Project configuration:
WARN: File '/opt/workspace/eclipse/java/my-app/src/main/java/com/mycompany/app/HelloWorld.java' is ignored. It is not located in project basedir '/opt/workspace/eclipse/java/my-app/target/classes/com/mycompany/app'.
WARN: File '/opt/workspace/eclipse/java/my-app/src/main/java/com/mycompany/app/AppRunner.java' is ignored. It is not located in project basedir '/opt/workspace/eclipse/java/my-app/target/classes/com/mycompany/app'.
WARN: File '/opt/workspace/eclipse/java/my-app/src/main/java/com/mycompany/app/sonar-scanner.properties' is ignored. It is not located in project basedir '/opt/workspace/eclipse/java/my-app/target/classes/com/mycompany/app'.
INFO: 0 files indexed
INFO: ------------- Run sensors on module com.mycompany.app:my-app
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=38ms
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by net.sf.cglib.core.ReflectUtils$1 (file:/home/dogzilla/.sonar/cache/54f6535c111cefad0fb6a09ba3e61922/sonar-javascript-plugin.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of net.sf.cglib.core.ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
INFO: Sensor SonarCSS Rules [cssfamily]
INFO: No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped.
INFO: Sensor SonarCSS Rules [cssfamily] (done) | time=1ms
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: 'sonar.coverage.jacoco.xmlReportPaths' is not defined. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
INFO: No report imported, no coverage information will be imported by JaCoCo XML Report Importer
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=3ms
INFO: Sensor JavaXmlSensor [java]
INFO: Sensor JavaXmlSensor [java] (done) | time=0ms
INFO: ------------- Run sensors on project
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=0ms
INFO: SCM Publisher is disabled
INFO: CPD Executor Calculating CPD for 0 files
INFO: CPD Executor CPD calculation finished (done) | time=0ms
INFO: Analysis report generated in 70ms, dir size=77 KB
INFO: Analysis report compressed in 12ms, zip size=9 KB
INFO: Analysis report uploaded in 35ms
INFO: ANALYSIS SUCCESSFUL, you can browse http://192.168.56.111:9000/dashboard?id=com.mycompany.app%3Amy-app
INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
INFO: More about the report processing at http://192.168.56.111:9000/api/ce/task?id=AXQeYMFVCyJo7mZCTWSk
INFO: Analysis total time: 2.802 s
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 3.561s
INFO: Final Memory: 6M/37M
INFO: ------------------------------------------------------------------------

Sonarqube scanner cannot resolve relative file path in PHPUnit coverage XML file

When executing sonar-scanner with the example project available at:
https://github.com/SonarSource/sonar-examples/tree/b0ebd45081e58c3cb7c660287d5ed7fb9c64bb17/projects/languages/php/php-sonar-runner-unit-tests
I get the following warning, and the coverage data is not sent to the Sonar host:
WARN: Could not resolve 1 file paths in phpunit.coverage.xml, first unresolved path: src/Math.php
Full output of command:
root#46e4a60694f9:/home/test/sonar-examples-master/projects/languages/php/php-sonar-runner-unit-tests# /home/sonar-scanner-2.8/bin/sonar-scanner
INFO: Scanner configuration file: /home/sonar-scanner-2.8/conf/sonar-scanner.properties
INFO: Project root configuration file: /home/test/sonar-examples-master/projects/languages/php/php-sonar-runner-unit-tests/sonar-project.properties
INFO: SonarQube Scanner 2.8
INFO: Java 1.8.0_111 Oracle Corporation (64-bit)
INFO: Linux 4.4.27-boot2docker amd64
INFO: User cache: /root/.sonar/cache
INFO: Load global repositories
INFO: Load global repositories (done) | time=240ms
INFO: User cache: /root/.sonar/cache
INFO: Load plugins index
INFO: Load plugins index (done) | time=24ms
INFO: SonarQube server 6.1
INFO: Default locale: "en", source code encoding: "UTF-8"
INFO: Process project properties
INFO: Load project repositories
INFO: Load project repositories (done) | time=141ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=55ms
INFO: Load active rules
INFO: Load active rules (done) | time=141ms
WARN: SCM provider autodetection failed. No SCM provider claims to support this project. Please use sonar.scm.provider to define SCM of your project.
INFO: Publish mode
INFO: ------------- Scan PHP :: PHPUnit :: SonarQube Scanner
INFO: Language is forced to php
INFO: Load server rules
INFO: Load server rules (done) | time=76ms
INFO: Base dir: /home/test/sonar-examples-master/projects/languages/php/php-sonar-runner-unit-tests
INFO: Working dir: /home/test/sonar-examples-master/projects/languages/php/php-sonar-runner-unit-tests/.sonar
INFO: Source paths: src
INFO: Test paths: tests
INFO: Source encoding: UTF-8, default locale: en
INFO: Index files
INFO: 3 files indexed
INFO: Quality profile for php: Sonar way
INFO: Sensor Lines Sensor
INFO: Sensor Lines Sensor (done) | time=25ms
INFO: Sensor NoSonar Sensor
INFO: Sensor NoSonar Sensor (done) | time=65ms
INFO: Sensor SCM Sensor
INFO: No SCM system was detected. You can use the 'sonar.scm.provider' property to explicitly specify it.
INFO: Sensor SCM Sensor (done) | time=0ms
INFO: Sensor PHP sensor
INFO: 2 source files to be analyzed
INFO: 2/2 source files have been analyzed
INFO: Analyzing PHPUnit test report: reports/phpunit.xml with org.sonar.plugins.php.phpunit.PhpUnitResultParser#31ddd4a4
INFO: Analyzing PHPUnit unit test coverage report: reports/phpunit.coverage.xml with PHPUnit Unit Test Coverage Result Parser
WARN: Could not resolve 1 file paths in phpunit.coverage.xml, first unresolved path: src/Math.php
INFO: No PHPUnit integration test coverage report provided (see 'sonar.php.coverage.itReportPath' property)
INFO: No PHPUnit overall coverage report provided (see 'sonar.php.coverage.overallReportPath' property)
INFO: Sensor PHP sensor (done) | time=1419ms
INFO: Sensor Analyzer for "php.ini" files
INFO: Sensor Analyzer for "php.ini" files (done) | time=11ms
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=49ms
INFO: Sensor Code Colorizer Sensor
INFO: Sensor Code Colorizer Sensor (done) | time=1ms
INFO: Sensor CPD Block Indexer
INFO: DefaultCpdBlockIndexer is used for php
INFO: Sensor CPD Block Indexer (done) | time=2ms
INFO: Calculating CPD for 2 files
INFO: CPD calculation finished
INFO: Analysis report generated in 96ms, dir size=27 KB
INFO: Analysis reports compressed in 18ms, zip size=13 KB
INFO: Analysis report uploaded in 115ms
INFO: ANALYSIS SUCCESSFUL, you can browse http://***.elasticbeanstalk.com/dashboard/index/org.sonarqube:php-ut-sq-scanner
INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
INFO: More about the report processing at http://***.elasticbeanstalk.com/api/ce/task?id=AVhaEXKjVjsdBlz4sGdU
INFO: Task total time: 3.511 s
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 5.098s
INFO: Final Memory: 42M/149M
INFO: ------------------------------------------------------------------------
When I change the path to absolute in the phpunit.coverage.xml, it seems to be working in Linux. On Windows docker quick start terminal (MINGW64) the only way to make it work is by using windows-style absolute paths:
C:\Users\username\projects\php-sonar-runner-unit-tests
Is there any way to make it work with relative paths?
Quoting from the README (on the same page that you linked):
In "reports/phpunit.coverage.xml", change the path "src/Math.php" to the full path of this file on your machine.
You must use the absolute path. It doesn't work with relative paths.
Note that this is just an example coverage report file, using one pre-generated by PHPUnit (also mentioned in the README). Normally you generate the coverage report file yourself before running SonarQube analysis, in which case it will have the correct absolute path in your system.

SonarQube: No analysis retrieved

I tried to run a project.
The execution was successful but there seems to not have any analysis.
The log from the command prompt is as follow:
C:\Users\kong-yong.tay\Desktop\Sonar\sonar-scanner-2.6.1\bin>sonar-scanner.bat
C:\Users\kong-yong.tay\Desktop\Sonar\sonar-scanner-2.6.1\bin\..
INFO: Scanner configuration file: C:\Users\kong-yong.tay\Desktop\Sonar\sonar-sca
nner-2.6.1\bin\..\conf\sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarQube Scanner 2.6.1
INFO: Java 1.8.0_102 Oracle Corporation (64-bit)
INFO: Windows 7 6.1 amd64
INFO: User cache: C:\Users\kong-yong.tay\.sonar\cache
INFO: Load global repositories
INFO: Load global repositories (done) | time=167ms
WARN: Property 'sonar.jdbc.url' is not supported any more. It will be ignored. T
here is no longer any DB connection to the SQ database.
INFO: User cache: C:\Users\kong-yong.tay\.sonar\cache
INFO: Load plugins index
INFO: Load plugins index (done) | time=11ms
INFO: SonarQube server 5.6
INFO: Default locale: "en_US", source code encoding: "UTF-8"
INFO: Process project properties
INFO: Load project repositories
INFO: Load project repositories (done) | time=173ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=87ms
INFO: Load active rules
INFO: Load active rules (done) | time=569ms
WARN: SCM provider autodetection failed. No SCM provider claims to support this
project. Please use sonar.scm.provider to define SCM of your project.
INFO: Publish mode
INFO: ------------- Scan Javascript Sonar Runner Simple
INFO: Language is forced to js
INFO: Load server rules
INFO: Load server rules (done) | time=325ms
INFO: Base dir: C:\Users\kong-yong.tay\Desktop\Sonar\sonar-scanner-2.6.1\bin
INFO: Working dir: C:\Users\kong-yong.tay\Desktop\Sonar\sonar-scanner-2.6.1\bin\
.sonar
INFO: Source paths: C:\Users\kong-yong.tay\Desktop\Sonar\sonar-examples-master\p
rojects\languages\javascript\javascript-sonar-runner\src
INFO: Source encoding: UTF-8, default locale: en_US
INFO: Index files
WARN: File 'C:\Users\kong-yong.tay\Desktop\Sonar\sonar-examples-master\projects\
languages\javascript\javascript-sonar-runner\src\Person.js' is ignored. It is no
t located in module basedir 'C:\Users\kong-yong.tay\Desktop\Sonar\sonar-scanner-
2.6.1\bin'.
INFO: 0 files indexed
INFO: Quality profile for js: Sonar way
INFO: JaCoCoSensor: JaCoCo report not found : C:\Users\kong-yong.tay\Desktop\Son
ar\sonar-scanner-2.6.1\bin\target\jacoco.exec
INFO: JaCoCoItSensor: JaCoCo IT report not found: C:\Users\kong-yong.tay\Desktop
\Sonar\sonar-scanner-2.6.1\bin\target\jacoco-it.exec
INFO: Sensor Lines Sensor
INFO: Sensor Lines Sensor (done) | time=0ms
INFO: Sensor SCM Sensor
INFO: No SCM system was detected. You can use the 'sonar.scm.provider' property
to explicitly specify it.
INFO: Sensor SCM Sensor (done) | time=2ms
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=0ms
INFO: Sensor Code Colorizer Sensor
INFO: Sensor Code Colorizer Sensor (done) | time=0ms
INFO: Sensor CPD Block Indexer
INFO: DefaultCpdBlockIndexer is used for js
INFO: Sensor CPD Block Indexer (done) | time=1ms
INFO: Calculating CPD for 0 files
INFO: CPD calculation finished
INFO: Analysis report generated in 72ms, dir size=11 KB
INFO: Analysis reports compressed in 14ms, zip size=4 KB
INFO: Analysis report uploaded in 86ms
INFO: ANALYSIS SUCCESSFUL, you can browse http://localhost:9000/dashboard/index/
org.sonarqube:java-simple-sq-scanner
INFO: Note that you will be able to access the updated dashboard once the server
has processed the submitted analysis report
INFO: More about the report processing at http://localhost:9000/api/ce/task?id=A
VZ3vdRUAtopFvSq_-I1
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 4.071s
INFO: Final Memory: 47M/180M
INFO: ------------------------------------------------------------------------
It ran the first time (though without any analysis results but there was a log recorded in the database). However, for the subsequent time that I've ran the test, it has already stopped the connection to the database.
Please help.
You should run SonarQube Scanner in the directory where your project is located, not from where the Scanner is stored. In short (and in your case):
> cd C:\Users\kong-yong.tay\Desktop\Sonar\sonar-examples-master\projects\languages\javascript\javascript-sonar-runner
> C:\Users\kong-yong.tay\Desktop\Sonar\sonar-scanner-2.6.1\bin\sonar-scanner.bat
Current situation
Currently you run it from:
INFO: Working dir: C:\Users\kong-yong.tay\Desktop\Sonar\sonar-scanner-2.6.1\bin\
But your code is in:
INFO: Source paths: C:\Users\kong-yong.tay\Desktop\Sonar\sonar-examples-master\projects\languages\javascript\javascript-sonar-runner\src
And since you did not explicitely set sonar.projectBaseDir (see Analysis Parameters), you end up with this warning:
WARN: File 'C:\Users\kong-yong.tay\Desktop\Sonar\sonar-examples-master\projects\
languages\javascript\javascript-sonar-runner\src\Person.js' is ignored. It is no
t located in module basedir 'C:\Users\kong-yong.tay\Desktop\Sonar\sonar-scanner-
2.6.1\bin'.
INFO: 0 files indexed

New Msbuild Sonar runner is skipping analysis for .net projects

I have setup new Msbuild sonar runner and kickoff analysis for a project type "class library". It went successful. To test it further,
I have created one more project which has only one file with 5 Interface definitions.
I made sure that names of interfaces NOT started with letter 'i'.
I created a quality profile with one stylecop rule i.e. "Interface names must begin with i".
I started cmd prompt (VS command prompt) and change it's path to the directory which has .csproj file. Clearly I am NOT at .sln file level. precisely one more level down where we can see .csproj file.
Fired Begin - msbuild -end sequence.
It shows ANALYSIS SUCCESSFUL but when I don't see any issues on dashboard ( Issues zero where as I expect 5, each one is for one interface).
After careful observation of Log, It shows following message. I am not sure that I quite understand it.
WARNING: File is not under the project directory and cannot currently be analysed by SonarQube. File: C:\Users\raja.moparthi\AppData\Local\Temp.NETFramework,Version=v4.5.AssemblyAttributes.cs, project: D:\SonarQube-Test-Projects\Fibanocci\TestFib2\TestFib2.csproj
Please let me know what is going wrong here.
Begin command Log given below :
Default properties file was found at D:\MsBuildSonarQubeRunner\SonarQube.Analysis.xml
Loading analysis properties from D:\MsBuildSonarQubeRunner\SonarQube.Analysis.xml
Pre-processing started.
Using environment variables to determine the download directory...
Removing the existing directory: D:\SonarQube-Test-Projects\Fibanocci\TestFib2\.sonarqube
Creating directory: D:\SonarQube-Test-Projects\Fibanocci\TestFib2\.sonarqube
Creating directory: D:\SonarQube-Test-Projects\Fibanocci\TestFib2\.sonarqube\bin
SonarQube server url: http://{SonarQube ServerName: I removed it}:9000/
Downloading SonarQube.MSBuild.Runner.Implementation.zip from http://{SonarQube ServerName: I removed it}/static/csharp/SonarQube.MSBuild.Runner.Implementation.zip to D:\SonarQube-Test-Projects\Fibanocci\TestFib2\.sonarqube\bin\SonarQube.MSBuild.Runner.Implementation.zip
Executing file D:\SonarQube-Test-Projects\Fibanocci\TestFib2\.sonarqube\bin\MSBuild.SonarQube.Internal.PreProcess.exe
Args: "/k:FibTest" "/n:FibTestAnalysis" "/v:1.0.0.0" "/s:D:\MsBuildSonarQubeRunner\SonarQube.Analysis.xml"
Working directory: D:\SonarQube-Test-Projects\Fibanocci\TestFib2\.sonarqube
Timeout (ms):-1
Process id: 4692
10:51:21 PM Loading analysis properties from D:\MsBuildSonarQubeRunner\SonarQube.Analysis.xml
10:51:21 PM The file SonarQube.Integration.ImportBefore.targets is up to date at C:\Users\raja.moparthi\AppData\Local\Microsoft\MSBuild\14.0\Microsoft.Common.targets\ImportBefore
10:51:21 PM The file SonarQube.Integration.ImportBefore.targets is up to date at C:\Users\raja.moparthi\AppData\Local\Microsoft\MSBuild\12.0\Microsoft.Common.targets\ImportBefore
10:51:21 PM The file SonarQube.Integration.ImportBefore.targets is up to date at C:\Users\raja.moparthi\AppData\Local\Microsoft\MSBuild\4.0\Microsoft.Common.targets\ImportBefore
10:51:21 PM Not running under TeamBuild
10:51:21 PM Analysis base directory: D:\SonarQube-Test-Projects\Fibanocci\TestFib2\.sonarqube
Build directory:
Bin directory: D:\SonarQube-Test-Projects\Fibanocci\TestFib2\.sonarqube\bin
Config directory: D:\SonarQube-Test-Projects\Fibanocci\TestFib2\.sonarqube\conf
Output directory: D:\SonarQube-Test-Projects\Fibanocci\TestFib2\.sonarqube\out
Config file: D:\SonarQube-Test-Projects\Fibanocci\TestFib2\.sonarqube\out
10:51:21 PM Creating config and output folders...
10:51:21 PM Creating directory: D:\SonarQube-Test-Projects\Fibanocci\TestFib2\.sonarqube\conf
10:51:21 PM Creating directory: D:\SonarQube-Test-Projects\Fibanocci\TestFib2\.sonarqube\out
10:51:21 PM Generating the FxCop ruleset: D:\SonarQube-Test-Projects\Fibanocci\TestFib2\.sonarqube\conf\SonarQubeFxCop-cs.ruleset
10:51:22 PM Generating the FxCop ruleset: D:\SonarQube-Test-Projects\Fibanocci\TestFib2\.sonarqube\conf\SonarQubeFxCop-vbnet.ruleset
10:51:22 PM Saving the config file to D:\SonarQube-Test-Projects\Fibanocci\TestFib2\.sonarqube\conf\SonarQubeAnalysisConfig.xml
Process returned exit code 0
Pre-processing succeeded.
----------------
Msbuild command log is given below.
Microsoft (R) Build Engine version 12.0.21005.1
[Microsoft .NET Framework, version 4.0.30319.34209]
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 9/8/2015 10:51:36 PM.
Project "D:\SonarQube-Test-Projects\Fibanocci\TestFib2\TestFib2.csproj" on node 1 (default targets).
GenerateTargetFrameworkMonikerAttribute:
Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
CoreCompile:
Skipping target "CoreCompile" because all output files are up-to-date with respect to the input files.
_CopyAppConfigFile:
Skipping target "_CopyAppConfigFile" because all output files are up-to-date with respect to the input files.
CopyFilesToOutputDirectory:
TestFib2 -> D:\SonarQube-Test-Projects\Fibanocci\TestFib2\bin\Debug\TestFib2.exe
OverrideCodeAnalysisProperties:
Skipping FxCop analysis: the SonarQube ruleset does not exist. Ruleset: D:\SonarQube-Test-Projects\Fibanocci
\TestFib2\.sonarqube\conf\\SonarQubeFxCop-cs.ruleset
Skipping FxCop analysis: the project is a test project
SetStyleCopAnalysisSettings:
Setting 'sonar.stylecop.projectFilePath' to 'D:\SonarQube-Test-Projects\Fibanocci\TestFib2\TestFib2.csproj'
WriteSonarQubeProjectData:
Directory "D:\SonarQube-Test-Projects\Fibanocci\TestFib2\.sonarqube\out\\TestFib2__AnyCPU_Debug_635773494965392474" doesn't exist. Skipping.
Creating directory "D:\SonarQube-Test-Projects\Fibanocci\TestFib2\.sonarqube\out\\TestFib2__AnyCPU_Debug_635773494965392474".
Done Building Project "D:\SonarQube-Test-Projects\Fibanocci\TestFib2\TestFib2.csproj" (default targets).
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:00.32
End
----------------
End command log is given below.
Default properties file was found at D:\MsBuildSonarQubeRunner\SonarQube.Analysis.xml
Loading analysis properties from D:\MsBuildSonarQubeRunner\SonarQube.Analysis.xml
Post-processing started.
Using environment variables to determine the download directory...
Executing file D:\SonarQube-Test-Projects\Fibanocci\TestFib2\.sonarqube\bin\MSBuild.SonarQube.Internal.PostProcess.exe
Args:
Working directory: D:\SonarQube-Test-Projects\Fibanocci\TestFib2\.sonarqube
Timeout (ms):-1
Process id: 8528
10:51:54 PM Not running under TeamBuild
10:51:54 PM Analysis base directory: D:\SonarQube-Test-Projects\Fibanocci\TestFib2\.sonarqube
Build directory:
Bin directory: D:\SonarQube-Test-Projects\Fibanocci\TestFib2\.sonarqube\bin
Config directory: D:\SonarQube-Test-Projects\Fibanocci\TestFib2\.sonarqube\conf
Output directory: D:\SonarQube-Test-Projects\Fibanocci\TestFib2\.sonarqube\out
Config file: D:\SonarQube-Test-Projects\Fibanocci\TestFib2\.sonarqube\out
10:51:54 PM Loading the SonarQube analysis config from D:\SonarQube-Test-Projects\Fibanocci\TestFib2\.sonarqube\conf\SonarQubeAnalysisConfig.xml
10:51:54 PM Generating SonarQube project properties file to D:\SonarQube-Test-Projects\Fibanocci\TestFib2\.sonarqube\out\sonar-project.properties
10:51:54 PM WARNING: File is not under the project directory and cannot currently be analysed by SonarQube. File: C:\Users\raja.moparthi\AppData\Local\Temp\.NETFramework,Version=v4.5.AssemblyAttributes.cs, project: D:\SonarQube-Test-Projects\Fibanocci\TestFib2\TestFib2.csproj
10:51:54 PM Writing processing summary to D:\SonarQube-Test-Projects\Fibanocci\TestFib2\.sonarqube\out\ProjectInfo.log
10:51:54 PM Creating directory: D:\SonarQube-Test-Projects\Fibanocci\TestFib2\.sonarqube\bin\sonar-runner
10:51:54 PM The SONAR_RUNNER_HOME environment variable is not required and will be ignored.
10:51:54 PM Calling the sonar-runner...
10:51:54 PM SONAR_RUNNER_OPTS is not configured. Setting it to the default value of -Xmx1024m
10:51:54 PM Setting environment variable 'SONAR_RUNNER_OPTS'. Value: -Xmx1024m
10:51:54 PM Executing file D:\SonarQube-Test-Projects\Fibanocci\TestFib2\.sonarqube\bin\sonar-runner\bin\sonar-runner.bat
Args: -Dproject.settings="D:\SonarQube-Test-Projects\Fibanocci\TestFib2\.sonarqube\out\sonar-project.properties"
Working directory: D:\SonarQube-Test-Projects\Fibanocci\TestFib2\.sonarqube\bin\sonar-runner\bin
Timeout (ms):-1
Process id: 11196
10:51:54 PM D:\SonarQube-Test-Projects\Fibanocci\TestFib2\.sonarqube\bin\sonar-runner\bin\..
10:51:54 PM SonarQube Runner 2.4
10:51:54 PM Java 1.8.0_60 Oracle Corporation (64-bit)
10:51:54 PM Windows 7 6.1 amd64
10:51:54 PM SONAR_RUNNER_OPTS=-Xmx1024m
10:51:54 PM INFO: Runner configuration file: D:\SonarQube-Test-Projects\Fibanocci\TestFib2\.sonarqube\bin\sonar-runner\bin\..\conf\sonar-runner.properties
10:51:54 PM INFO: Project configuration file: D:\SonarQube-Test-Projects\Fibanocci\TestFib2\.sonarqube\out\sonar-project.properties
10:51:54 PM INFO: Default locale: "en_US", source code encoding: "UTF-8"
10:51:54 PM INFO: Work directory: D:\SonarQube-Test-Projects\Fibanocci\TestFib2\.sonarqube\out\.sonar
10:51:55 PM INFO: SonarQube Server 5.0.1
10:51:56 PM 22:51:56.238 INFO - Load global referentials...
10:51:57 PM 22:51:57.049 INFO - Load global referentials done: 813 ms
10:51:57 PM 22:51:57.055 INFO - User cache: C:\Users\raja.moparthi\.sonar\cache
10:51:57 PM 22:51:57.065 INFO - Install plugins
10:51:57 PM 22:51:57.390 INFO - Install JDBC driver
10:51:57 PM 22:51:57.600 INFO - Create JDBC datasource for jdbc:jtds:sqlserver://{DB server- I removed original server name for security purpose}/sonar;SelectMethod=Cursor
10:52:04 PM 22:52:04.530 INFO - Initializing Hibernate
10:52:07 PM 22:52:07.162 INFO - Load project referentials...
10:52:10 PM 22:52:10.353 INFO - Load project referentials done: 3191 ms
10:52:10 PM 22:52:10.354 INFO - Load project settings
10:52:10 PM 22:52:10.884 INFO - Loading technical debt model...
10:52:11 PM 22:52:11.930 INFO - Loading technical debt model done: 1046 ms
10:52:11 PM 22:52:11.936 INFO - Apply project exclusions
10:52:20 PM 22:52:20.949 WARN - SCM provider autodetection failed. No SCM provider claims to support this project. Please use sonar.scm.provider to define SCM of your project.
10:52:20 PM 22:52:20.951 INFO - ------------- Scan TestFib2
10:52:20 PM 22:52:20.955 INFO - Load module settings
10:52:57 PM 22:52:57.308 INFO - Loading rules...
10:53:07 PM 22:53:07.904 INFO - Loading rules done: 10596 ms
10:53:08 PM 22:53:08.100 INFO - Configure Maven plugins
10:53:10 PM 22:53:10.219 INFO - Compare to previous analysis (2015-09-08)
10:53:10 PM 22:53:10.439 INFO - Compare over 30 days (2015-08-09, analysis of 2015-09-08 21:09:01.457)
10:53:10 PM 22:53:10.441 INFO - No quality gate is configured.
10:53:10 PM 22:53:10.513 INFO - Base dir: D:\SonarQube-Test-Projects\Fibanocci\TestFib2
10:53:10 PM 22:53:10.514 INFO - Working dir: D:\SonarQube-Test-Projects\Fibanocci\TestFib2\.sonarqube\out\.sonar\FibTest_FibTest_B51D1FBF-8925-45C4-B8C8-5DBE2F60DBCE
10:53:10 PM 22:53:10.518 INFO - Test paths: Program.cs, Properties/AssemblyInfo.cs, App.config
10:53:10 PM 22:53:10.519 INFO - Source encoding: UTF-8, default locale: en_US
10:53:10 PM 22:53:10.519 INFO - Index files
10:53:10 PM 22:53:10.576 INFO - 2 files indexed
10:53:15 PM 22:53:15.923 INFO - Quality profile for cs: Mks Test Rules
10:53:15 PM 22:53:15.949 INFO - Sensor QProfileSensor...
10:53:15 PM 22:53:15.961 INFO - Sensor QProfileSensor done: 12 ms
10:53:15 PM 22:53:15.961 INFO - Sensor InitialOpenIssuesSensor...
10:53:17 PM 22:53:17.547 INFO - Sensor InitialOpenIssuesSensor done: 1586 ms
10:53:17 PM 22:53:17.548 INFO - Sensor ProjectLinksSensor...
10:53:18 PM 22:53:18.541 INFO - Sensor ProjectLinksSensor done: 993 ms
10:53:19 PM 22:53:19.130 INFO - Sensor VersionEventsSensor...
10:53:21 PM 22:53:21.896 INFO - Sensor VersionEventsSensor done: 2766 ms
10:53:21 PM 22:53:21.896 INFO - Sensor FileHashSensor...
10:53:21 PM 22:53:21.904 INFO - Sensor FileHashSensor done: 8 ms
10:53:21 PM 22:53:21.904 INFO - Sensor SCM Sensor...
10:53:21 PM 22:53:21.904 INFO - No SCM system was detected. You can use the 'sonar.scm.provider' property to explicitly specify it.
10:53:21 PM 22:53:21.904 INFO - Sensor SCM Sensor done: 0 ms
10:53:21 PM 22:53:21.904 INFO - Sensor CPD Sensor...
10:53:21 PM 22:53:21.905 INFO - DefaultCpdEngine is used for cs
10:53:21 PM 22:53:21.906 INFO - Sensor CPD Sensor done: 2 ms
10:53:22 PM 22:53:22.118 INFO - Execute decorators...
10:53:28 PM 22:53:28.033 INFO - ------------- Scan FibTestAnalysis
10:53:28 PM 22:53:28.039 INFO - Load module settings
10:53:28 PM 22:53:28.086 INFO - Configure Maven plugins
10:53:28 PM 22:53:28.291 INFO - Compare to previous analysis (2015-09-08)
10:53:28 PM 22:53:28.491 INFO - Compare over 30 days (2015-08-09, analysis of 2015-09-08 21:09:01.457)
10:53:28 PM 22:53:28.493 INFO - No quality gate is configured.
10:53:28 PM 22:53:28.518 INFO - Base dir: D:\SonarQube-Test-Projects\Fibanocci\TestFib2
10:53:28 PM 22:53:28.518 INFO - Working dir: D:\SonarQube-Test-Projects\Fibanocci\TestFib2\.sonarqube\out\.sonar
10:53:28 PM 22:53:28.518 INFO - Source encoding: UTF-8, default locale: en_US
10:53:29 PM 22:53:29.121 INFO - Sensor InitialOpenIssuesSensor...
10:53:30 PM 22:53:30.301 INFO - Sensor InitialOpenIssuesSensor done: 1180 ms
10:53:30 PM 22:53:30.302 INFO - Sensor ProjectLinksSensor...
10:53:30 PM 22:53:30.893 INFO - Sensor ProjectLinksSensor done: 591 ms
10:53:31 PM 22:53:31.483 INFO - Sensor VersionEventsSensor...
10:53:33 PM 22:53:33.659 INFO - Sensor VersionEventsSensor done: 2176 ms
10:53:33 PM 22:53:33.659 INFO - Sensor FileHashSensor...
10:53:33 PM 22:53:33.660 INFO - Sensor FileHashSensor done: 1 ms
10:53:33 PM 22:53:33.660 INFO - Sensor SCM Sensor...
10:53:33 PM 22:53:33.660 INFO - No SCM system was detected. You can use the 'sonar.scm.provider' property to explicitly specify it.
10:53:33 PM 22:53:33.660 INFO - Sensor SCM Sensor done: 0 ms
10:53:33 PM 22:53:33.660 INFO - Sensor CPD Sensor...
10:53:33 PM 22:53:33.660 INFO - Sensor CPD Sensor done: 0 ms
10:53:33 PM 22:53:33.774 INFO - Execute decorators...
10:53:37 PM 22:53:37.356 INFO - Store results in database
10:53:42 PM 22:53:42.464 INFO - ANALYSIS SUCCESSFUL, you can browse http://{ server- I removed original server name for security purpose}:9000/dashboard/index/FibTest
10:53:42 PM 22:53:42.464 INFO - Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report.
10:53:42 PM 22:53:42.465 INFO - Executing post-job class org.sonar.plugins.core.issue.notification.SendIssueNotificationsPostJob
10:53:44 PM INFO: ------------------------------------------------------------------------
10:53:44 PM INFO: EXECUTION SUCCESS
10:53:44 PM INFO: ------------------------------------------------------------------------
10:53:44 PM Total time: 1:49.413s
10:53:44 PM Final Memory: 14M/457M
10:53:44 PM INFO: ------------------------------------------------------------------------
10:53:44 PM Process returned exit code 0
10:53:44 PM The sonar-runner has finished
10:53:44 PM Creating a summary markdown file...
10:53:44 PM Analysis results: http://{ server- I removed original server name for security purpose}:9000/dashboard/index/FibTest
Process returned exit code 0
Post-processing succeeded.
Thanks for providing all these valuable details in your questions, which makes it easier to answer.
First of all, you can safely ignore the message C:\Users\raja.moparthi\AppData\Local\Temp.NETFramework,Version=v4.5.AssemblyAttributes.cs : That file does not belong to your project, and does not have to be analyzed.
Then, I think that you are facing a limitation of the MSBuild SonarQube Runner 1.0 release, which is already fixed in the soon to be released 1.0.1 version: If the full path to your .csproj file contains test, the project will be detected as a test one, and SonarQube doesn't report issues on tests projects. See this tickets for details: https://jira.sonarsource.com/browse/SONARMSBRU-121 While waiting on this new release, the easiest thing you can do is simply to remove test from the folder names.
I still have the issue described by Dinesh using TFS' SonarQube Extension 2.0.0, which embeds SonarQube Scanner for MSBuild 2.2.0.24:
If the full path to your .csproj file contains test, the project will be detected as a test one, and SonarQube doesn't report issues on tests projects.
I've solved it by customizing the Test project pattern in Sonar Qube's Administration | Configuration | General Settings | Scanner for MSBuild.

Resources