Sonarqube does not show issues that break the default rules

I just installed SonarQube 8.3 and set it up. When I run the scanner from maven sonar goal, it only generates issues for a couple of rules: 1. Thread.sleep and 2. commented out lines

For other code that patently break the rules of the default Sonar way quality profile, like, catch clause should do more than rethrow, or basic authentication should not be used, etc., they do not get highlighted as issues.

This is my SonarQube output:

[INFO] User cache: C:\Users\34150.sonar\cache
[INFO] SonarQube version: 8.3.1
[INFO] Default locale: “en_US”, source code encoding: “UTF-8”
[WARNING] SonarScanner will require Java 11 to run starting in SonarQube 8.x
[INFO] Load global settings
[INFO] Load global settings (done) | time=772ms
[INFO] Server id: BF41A1F2-AXJV_gCVWGpLlXntVb6A
[INFO] User cache: C:\Users\34150.sonar\cache
[INFO] Load/download plugins
[INFO] Load plugins index
[INFO] Load plugins index (done) | time=403ms
[INFO] Load/download plugins (done) | time=1311ms
[INFO] Process project properties
[INFO] Process project properties (done) | time=722ms
[INFO] Execute project builders
[INFO] Execute project builders (done) | time=5ms
[INFO] Project key: com.acats:pssecom
[INFO] Base dir: C:\Users\34150\IdeaProjects\ecom-web
[INFO] Working dir: C:\Users\34150\IdeaProjects\ecom-web\target\sonar
[INFO] Load project settings for component key: ‘com.acats:pssecom’
[INFO] Load project settings for component key: ‘com.acats:pssecom’ (done) | time=25ms
[INFO] Load quality profiles
[INFO] Load quality profiles (done) | time=485ms
[INFO] Load active rules
[INFO] Load active rules (done) | time=4179ms
[INFO] Indexing files…
[INFO] Project configuration:
[INFO] 48 files indexed
[INFO] 0 files ignored because of scm ignore settings
[INFO] Quality profile for java: Sonar way
[INFO] Quality profile for xml: Sonar way
[INFO] ------------- Run sensors on module pssecom
[INFO] Load metrics repository
[INFO] Load metrics repository (done) | time=63ms
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by net.sf.cglib.core.ReflectUtils$1 (file:/C:/Users/34150/.sonar/cache/54f6535c111cefad0fb6a09ba3e61922/sonar-javascript-plugin.jar) to metho
d java.lang.ClassLoader.defineClass(java.lang.String,byte,int,int,
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 JavaSquidSensor [java]
[INFO] Configured Java source version ( 8
[INFO] JavaClasspath initialization
[INFO] JavaClasspath initialization (done) | time=94ms
[INFO] JavaTestClasspath initialization
[INFO] JavaTestClasspath initialization (done) | time=16ms
[INFO] Java Main Files AST scan
[INFO] 0 source files to be analyzed
[INFO] Java Main Files AST scan (done) | time=318ms
[INFO] 0/0 source files have been analyzed
[INFO] Java Test Files AST scan
[INFO] 47 source files to be analyzed
[INFO] Load project repositories
[INFO] Load project repositories (done) | time=423ms
[INFO] 5/47 files analyzed, current file: src/test/java/com/acats/ecom/stepdef/
[INFO] 46/47 files analyzed, current file: src/test/java/com/acats/
[INFO] 47/47 source files have been analyzed
[INFO] Java Test Files AST scan (done) | time=20288ms
[INFO] Java Generated Files AST scan
[INFO] 0 source files to be analyzed
[INFO] Java Generated Files AST scan (done) | time=4ms
[INFO] 0/0 source files have been analyzed
[INFO] Sensor JavaSquidSensor [java] (done) | time=33878ms
[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=5ms
[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/
[INFO] No report imported, no coverage information will be imported by JaCoCo XML Report Importer
[INFO] Sensor JaCoCo XML Report Importer [jacoco] (done) | time=33ms
[INFO] Sensor SurefireSensor [java]
[INFO] parsing [C:\Users\34150\IdeaProjects\ecom-web\target\surefire-reports]
[INFO] Sensor SurefireSensor [java] (done) | time=2636ms
[INFO] Sensor JavaXmlSensor [java]
[INFO] 1 source files to be analyzed
[INFO] Sensor JavaXmlSensor [java] (done) | time=672ms
[INFO] 1/1 source files have been analyzed
[INFO] Sensor HTML [web]
[INFO] Sensor HTML [web] (done) | time=6ms
[INFO] Sensor XML Sensor [xml]
[INFO] 1 source files to be analyzed
[INFO] Sensor XML Sensor [xml] (done) | time=504ms
[INFO] 1/1 source files have been analyzed
[INFO] ------------- Run sensors on project
[INFO] Sensor Zero Coverage Sensor
[INFO] Sensor Zero Coverage Sensor (done) | time=2ms
[INFO] Sensor Java CPD Block Indexer
[INFO] Sensor Java CPD Block Indexer (done) | time=2ms
[INFO] SCM Publisher SCM provider for this project is: git
[INFO] SCM Publisher 16 source files to be analyzed
[INFO] SCM Publisher 0/16 source files have been analyzed (done) | time=17773ms
[WARNING] Missing blame information for the following files:
[WARNING] * src/test/java/com/acats/common/utils/
[WARNING] * src/test/java/com/acats/ecom/pageobject/
[WARNING] * src/test/java/com/acats/ecom/stepdef/
[WARNING] * pom.xml
[WARNING] * src/test/java/com/acats/common/utils/
[WARNING] * src/test/java/com/acats/ecom/stepdef/
[WARNING] * src/test/java/com/acats/common/utils/
[WARNING] * src/test/java/com/acats/ecom/pageobject/
[WARNING] * src/test/java/com/acats/ecom/pageobject/
[WARNING] * src/test/java/com/acats/ecom/stepdef/
[WARNING] * src/test/java/com/acats/api/
[WARNING] * src/test/java/com/acats/common/utils/
[WARNING] * src/test/java/com/acats/common/utils/
[WARNING] * src/test/java/com/acats/common/utils/
[WARNING] * src/test/java/com/acats/ecom/pageobject/
[WARNING] * src/test/java/com/acats/
[WARNING] This may lead to missing/broken features in SonarQube
[INFO] CPD Executor Calculating CPD for 0 files
[INFO] CPD Executor CPD calculation finished (done) | time=0ms
[INFO] Analysis report generated in 1118ms, dir size=748 KB
[INFO] Analysis report compressed in 644ms, zip size=243 KB
[INFO] Analysis report uploaded in 162ms
[INFO] ANALYSIS SUCCESSFUL, you can browse http://localhost:9002/dashboard?id=com.acats%3Apssecom
[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:9002/api/ce/task?id=AXJXcej8RIgmarV8qk4q
[INFO] Analysis total time: 1:38.688 s

It looks like all your files are Test files – while we’re working on Test Code Quality (specifically for Java!), most rules don’t raise issues on Test files right now.

Where are your source files?

You’re right. All our files are Test files. They’re under various packages under src/test/java.