<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 <modelVersion>4.0.0</modelVersion>
 <groupId>wh.ee.sonar.testcode</groupId>
 <artifactId>wh.ee.sonar.testcode</artifactId>
 <version>0.0.1-SNAPSHOT</version>
 <properties>
  <sonar.sources>src\main\java\wh\ee\sonar\testcode</sonar.sources>
 </properties>
 </project>
package wh.ee.sonar.testcode;
public enum TestEnum {
    TEST1, TEST2;
}
package wh.ee.sonar.testcode;
public class TestCode {
    public static void testEnum(TestEnum t) {
        switch (t) {
        case TEST1:
            break;
        case TEST2:
            break;
        default:
            break;
        }
    }
    public static void testEnum2(TestEnum t) {
        if (TestEnum.TEST1.equals(t)) {
           Â
        }
        else if (TestEnum.TEST2.equals(t)) {
           Â
        }
        else {
           Â
        }
    }
}
In this file, the test rule will flag lines 6 and 8, but not lines 16 and 19.
package wh.test.sonar.plugin.checks;
import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
import org.sonar.check.Rule;
import org.sonar.plugins.java.api.JavaFileScanner;
import org.sonar.plugins.java.api.JavaFileScannerContext;
import org.sonar.plugins.java.api.tree.BaseTreeVisitor;
import org.sonar.plugins.java.api.tree.IdentifierTree;
import org.sonar.plugins.java.api.tree.IfStatementTree;
import org.sonar.plugins.java.api.tree.SwitchStatementTree;
@Rule(key = "TestSymbol", name = "Test for unknown symbols", description = "TBD")
public class TestSymbolRule extends BaseTreeVisitor implements JavaFileScanner {
    private static final Logger LOGGER = Loggers.get(TestSymbolRule.class);
    private JavaFileScannerContext context;
    @Override
    public void scanFile(JavaFileScannerContext ctx) {
        this.context = ctx;
        LOGGER.info("Scanning: " + context.getFile().getName());
        scan(context.getTree());
    }
    private boolean doCheck = false;
   Â
    @Override
    public void visitSwitchStatement(SwitchStatementTree tree) {
        doCheck = true;
        super.visitSwitchStatement(tree);
        doCheck = false;
    }
    @Override
    public void visitIfStatement(IfStatementTree tree) {
        doCheck = true;
        super.visitIfStatement(tree);
        doCheck = false;
    }
    @Override
    public void visitIdentifier(IdentifierTree tree) {
        super.visitIdentifier(tree);
        if (doCheck) {
            if (tree.symbol().isUnknown()) {
                context.reportIssue(this, tree, "identifier tree symbol is !unknown!");
            }
            else {
                LOGGER.info("identifier tree symbol: " + tree.symbol().name());
            }
        }
    }
}
Apache Maven 3.5.2 (138edd61fd100ec658bfa2d307c43b76940a5d7d; 2017-10-18T09:58:13+02:00)
Maven home: C:\AZ_DATEN\apache-maven-3.5.2\bin\..
Java version: 1.8.0_112, vendor: Oracle Corporation
Java home: C:\Program Files\Java\JRE8
Default locale: de_DE, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
[DEBUG] Created new class realm maven.api
[DEBUG] Importing foreign packages into class realm maven.api
[DEBUG] Â Imported: javax.annotation.* < plexus.core
[DEBUG] Â Imported: javax.enterprise.inject.* < plexus.core
[DEBUG] Â Imported: javax.enterprise.util.* < plexus.core
[DEBUG] Â Imported: javax.inject.* < plexus.core
[DEBUG] Â Imported: org.apache.maven.* < plexus.core
[DEBUG] Â Imported: org.apache.maven.artifact < plexus.core
[DEBUG] Â Imported: org.apache.maven.classrealm < plexus.core
[DEBUG] Â Imported: org.apache.maven.cli < plexus.core
[DEBUG] Â Imported: org.apache.maven.configuration < plexus.core
[DEBUG] Â Imported: org.apache.maven.exception < plexus.core
[DEBUG] Â Imported: org.apache.maven.execution < plexus.core
[DEBUG] Â Imported: org.apache.maven.execution.scope < plexus.core
[DEBUG] Â Imported: org.apache.maven.lifecycle < plexus.core
[DEBUG] Â Imported: org.apache.maven.model < plexus.core
[DEBUG] Â Imported: org.apache.maven.monitor < plexus.core
[DEBUG] Â Imported: org.apache.maven.plugin < plexus.core
[DEBUG] Â Imported: org.apache.maven.profiles < plexus.core
[DEBUG] Â Imported: org.apache.maven.project < plexus.core
[DEBUG] Â Imported: org.apache.maven.reporting < plexus.core
[DEBUG] Â Imported: org.apache.maven.repository < plexus.core
[DEBUG] Â Imported: org.apache.maven.rtinfo < plexus.core
[DEBUG] Â Imported: org.apache.maven.settings < plexus.core
[DEBUG] Â Imported: org.apache.maven.toolchain < plexus.core
[DEBUG] Â Imported: org.apache.maven.usability < plexus.core
[DEBUG] Â Imported: org.apache.maven.wagon.* < plexus.core
[DEBUG] Â Imported: org.apache.maven.wagon.authentication < plexus.core
[DEBUG] Â Imported: org.apache.maven.wagon.authorization < plexus.core
[DEBUG] Â Imported: org.apache.maven.wagon.events < plexus.core
[DEBUG] Â Imported: org.apache.maven.wagon.observers < plexus.core
[DEBUG] Â Imported: org.apache.maven.wagon.proxy < plexus.core
[DEBUG] Â Imported: org.apache.maven.wagon.repository < plexus.core
[DEBUG] Â Imported: org.apache.maven.wagon.resource < plexus.core
[DEBUG] Â Imported: org.codehaus.classworlds < plexus.core
[DEBUG] Â Imported: org.codehaus.plexus.* < plexus.core
[DEBUG] Â Imported: org.codehaus.plexus.classworlds < plexus.core
[DEBUG] Â Imported: org.codehaus.plexus.component < plexus.core
[DEBUG] Â Imported: org.codehaus.plexus.configuration < plexus.core
[DEBUG] Â Imported: org.codehaus.plexus.container < plexus.core
[DEBUG] Â Imported: org.codehaus.plexus.context < plexus.core
[DEBUG] Â Imported: org.codehaus.plexus.lifecycle < plexus.core
[DEBUG] Â Imported: org.codehaus.plexus.logging < plexus.core
[DEBUG] Â Imported: org.codehaus.plexus.personality < plexus.core
[DEBUG] Â Imported: org.codehaus.plexus.util.xml.Xpp3Dom < plexus.core
[DEBUG] Â Imported: org.codehaus.plexus.util.xml.pull.XmlPullParser < plexus.core
[DEBUG] Â Imported: org.codehaus.plexus.util.xml.pull.XmlPullParserException < plexus.core
[DEBUG] Â Imported: org.codehaus.plexus.util.xml.pull.XmlSerializer < plexus.core
[DEBUG] Â Imported: org.eclipse.aether.* < plexus.core
[DEBUG] Â Imported: org.eclipse.aether.artifact < plexus.core
[DEBUG] Â Imported: org.eclipse.aether.collection < plexus.core
[DEBUG] Â Imported: org.eclipse.aether.deployment < plexus.core
[DEBUG] Â Imported: org.eclipse.aether.graph < plexus.core
[DEBUG] Â Imported: org.eclipse.aether.impl < plexus.core
[DEBUG] Â Imported: org.eclipse.aether.installation < plexus.core
[DEBUG] Â Imported: org.eclipse.aether.internal.impl < plexus.core
[DEBUG] Â Imported: org.eclipse.aether.metadata < plexus.core
[DEBUG] Â Imported: org.eclipse.aether.repository < plexus.core
[DEBUG] Â Imported: org.eclipse.aether.resolution < plexus.core
[DEBUG] Â Imported: org.eclipse.aether.spi < plexus.core
[DEBUG] Â Imported: org.eclipse.aether.transfer < plexus.core
[DEBUG] Â Imported: org.eclipse.aether.version < plexus.core
[DEBUG] Â Imported: org.fusesource.jansi.* < plexus.core
[DEBUG] Â Imported: org.slf4j.* < plexus.core
[DEBUG] Â Imported: org.slf4j.helpers.* < plexus.core
[DEBUG] Â Imported: org.slf4j.spi.* < plexus.core
[DEBUG] Populating class realm maven.api
[INFO] Error stacktraces are turned on.
[DEBUG] Message scheme: color
[DEBUG] Message styles: debug info warning error success failure strong mojo project
[DEBUG] Reading global settings from C:\AZ_DATEN\apache-maven-3.5.2\bin\..\conf\settings.xml
[DEBUG] Reading user settings from C:\Users\mcfamvj\.m2\settings.xml
[DEBUG] Reading global toolchains from C:\AZ_DATEN\apache-maven-3.5.2\bin\..\conf\toolchains.xml
[DEBUG] Reading user toolchains from C:\Users\mcfamvj\.m2\toolchains.xml
[DEBUG] Using local repository at C:\AZ_DATEN\mvn_repository
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for C:\AZ_DATEN\mvn_repository
[INFO] Scanning for projects...
[DEBUG] Extension realms for project wh.ee.sonar.testcode:wh.ee.sonar.testcode:jar:0.0.1-SNAPSHOT: (none)
[DEBUG] Looking up lifecycle mappings for packaging jar from ClassRealm[plexus.core, parent: null]
[DEBUG] Resolving plugin prefix sonar from [org.apache.maven.plugins, org.codehaus.mojo]
[DEBUG] Could not find metadata org.apache.maven.plugins/maven-metadata.xml in local (C:\AZ_DATEN\mvn_repository)
[DEBUG] Skipped remote request for org.apache.maven.plugins/maven-metadata.xml, locally cached metadata up-to-date.
[DEBUG] Could not find metadata org.codehaus.mojo/maven-metadata.xml in local (C:\AZ_DATEN\mvn_repository)
[DEBUG] Skipped remote request for org.codehaus.mojo/maven-metadata.xml, locally cached metadata up-to-date.
[DEBUG] Resolved plugin prefix sonar to org.codehaus.mojo:sonar-maven-plugin from repository central
[DEBUG] Could not find metadata org.codehaus.mojo:sonar-maven-plugin/maven-metadata.xml in local (C:\AZ_DATEN\mvn_repository)
[DEBUG] Skipped remote request for org.codehaus.mojo:sonar-maven-plugin/maven-metadata.xml, locally cached metadata up-to-date.
[DEBUG] Resolved plugin version for org.codehaus.mojo:sonar-maven-plugin to 3.4.0.905 from repository central (https://repo.maven.apache.org/maven2, default, releases)
[DEBUG] === REACTOR BUILD PLAN ================================================
[DEBUG] Project: wh.ee.sonar.testcode:wh.ee.sonar.testcode:jar:0.0.1-SNAPSHOT
[DEBUG] Tasks: Â [sonar:sonar]
[DEBUG] Style: Â Aggregating
[DEBUG] =======================================================================
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building wh.ee.sonar.testcode 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[DEBUG] Resolving plugin prefix sonar from [org.apache.maven.plugins, org.codehaus.mojo]
[DEBUG] Could not find metadata org.apache.maven.plugins/maven-metadata.xml in local (C:\AZ_DATEN\mvn_repository)
[DEBUG] Skipped remote request for org.apache.maven.plugins/maven-metadata.xml, locally cached metadata up-to-date.
[DEBUG] Could not find metadata org.codehaus.mojo/maven-metadata.xml in local (C:\AZ_DATEN\mvn_repository)
[DEBUG] Skipped remote request for org.codehaus.mojo/maven-metadata.xml, locally cached metadata up-to-date.
[DEBUG] Resolved plugin prefix sonar to org.codehaus.mojo:sonar-maven-plugin from repository central
[DEBUG] Could not find metadata org.codehaus.mojo:sonar-maven-plugin/maven-metadata.xml in local (C:\AZ_DATEN\mvn_repository)
[DEBUG] Skipped remote request for org.codehaus.mojo:sonar-maven-plugin/maven-metadata.xml, locally cached metadata up-to-date.
[DEBUG] Resolved plugin version for org.codehaus.mojo:sonar-maven-plugin to 3.4.0.905 from repository central (https://repo.maven.apache.org/maven2, default, releases)
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] === PROJECT BUILD PLAN ================================================
[DEBUG] Project: Â Â Â wh.ee.sonar.testcode:wh.ee.sonar.testcode:0.0.1-SNAPSHOT
[DEBUG] Dependencies (collect): []
[DEBUG] Dependencies (resolve): [test]
[DEBUG] Repositories (dependencies): [central (https://repo.maven.apache.org/maven2, default, releases)]
[DEBUG] Repositories (plugins) Â Â : [central (https://repo.maven.apache.org/maven2, default, releases)]
[DEBUG] -----------------------------------------------------------------------
[DEBUG] Goal: Â Â Â Â Â org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar (default-cli)
[DEBUG] Style: Â Â Â Â Aggregating
[DEBUG] Configuration: <?xml version="1.0" encoding="UTF-8"?>
<configuration>
 <mojoExecution default-value="${mojoExecution}"/>
 <session default-value="${session}"/>
 <skip default-value="false">${sonar.skip}</skip>
</configuration>
[DEBUG] =======================================================================
[DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=60167, ConflictMarker.markTime=436850, ConflictMarker.nodeCount=1, ConflictIdSorter.graphTime=37924, ConflictIdSorter.topsortTime=926208, ConflictIdSorter.conflictIdCount=0, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=1834185, ConflictResolver.conflictItemCount=0, DefaultDependencyCollector.collectTime=238480, DefaultDependencyCollector.transformTime=5463172}
[DEBUG] wh.ee.sonar.testcode:wh.ee.sonar.testcode:jar:0.0.1-SNAPSHOT
[INFO]
[INFO] --- sonar-maven-plugin:3.4.0.905:sonar (default-cli) @ wh.ee.sonar.testcode ---
[DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=979812, ConflictMarker.markTime=27349, ConflictMarker.nodeCount=7, ConflictIdSorter.graphTime=121793, ConflictIdSorter.topsortTime=26255, ConflictIdSorter.conflictIdCount=6, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=2056620, ConflictResolver.conflictItemCount=7, DefaultDependencyCollector.collectTime=50752581, DefaultDependencyCollector.transformTime=3274548}
[DEBUG] org.sonarsource.scanner.maven:sonar-maven-plugin:jar:3.4.0.905:
[DEBUG] Â Â org.sonatype.plexus:plexus-sec-dispatcher:jar:1.4:compile
[DEBUG] Â Â Â org.sonatype.plexus:plexus-cipher:jar:1.4:compile
[DEBUG] Â Â org.codehaus.plexus:plexus-utils:jar:3.0.22:compile
[DEBUG] Â Â org.sonarsource.scanner.api:sonar-scanner-api:jar:2.10.0.1189:compile
[DEBUG] Â Â commons-lang:commons-lang:jar:2.6:compile
[DEBUG] Created new class realm plugin>org.codehaus.mojo:sonar-maven-plugin:3.4.0.905
[DEBUG] Importing foreign packages into class realm plugin>org.codehaus.mojo:sonar-maven-plugin:3.4.0.905
[DEBUG] Â Imported: Â < maven.api
[DEBUG] Populating class realm plugin>org.codehaus.mojo:sonar-maven-plugin:3.4.0.905
[DEBUG] Â Included: org.sonarsource.scanner.maven:sonar-maven-plugin:jar:3.4.0.905
[DEBUG] Â Included: org.sonatype.plexus:plexus-sec-dispatcher:jar:1.4
[DEBUG] Â Included: org.sonatype.plexus:plexus-cipher:jar:1.4
[DEBUG] Â Included: org.codehaus.plexus:plexus-utils:jar:3.0.22
[DEBUG] Â Included: org.sonarsource.scanner.api:sonar-scanner-api:jar:2.10.0.1189
[DEBUG] Â Included: commons-lang:commons-lang:jar:2.6
[DEBUG] Configuring mojo org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar from plugin realm ClassRealm[plugin>org.codehaus.mojo:sonar-maven-plugin:3.4.0.905, parent: sun.misc.Launcher$AppClassLoader@55f96302]
[DEBUG] Configuring mojo 'org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar' with basic configurator -->
[DEBUG] Â (f) mojoExecution = org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar {execution: default-cli}
[DEBUG] Â (f) session = org.apache.maven.execution.MavenSession@6a62689d
[DEBUG] Â (f) skip = false
[DEBUG] -- end configuration --
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] 18:17:12.373 Setting proxy properties
[DEBUG] 18:17:12.575 keyStore is :
[DEBUG] 18:17:12.575 keyStore type is : jks
[DEBUG] 18:17:12.575 keyStore provider is :
[DEBUG] 18:17:12.575 init keystore
[DEBUG] 18:17:12.575 init keymanager of type SunX509
[DEBUG] 18:17:13.005 Create: C:\Users\mcfamvj\.sonar\cache
[INFO] 18:17:13.005 User cache: C:\Users\mcfamvj\.sonar\cache
[DEBUG] 18:17:13.005 Create: C:\Users\mcfamvj\.sonar\cache\_tmp
[DEBUG] 18:17:13.005 Extract sonar-scanner-api-batch in temp...
[DEBUG] 18:17:13.015 Get bootstrap index...
[DEBUG] 18:17:13.015 Download: http://localhost:9000/batch/index
[DEBUG] 18:17:13.125 Get bootstrap completed
[DEBUG] 18:17:13.125 Create isolated classloader...
[DEBUG] 18:17:13.135 Start temp cleaning...
[DEBUG] 18:17:13.135 Temp cleaning done
[DEBUG] 18:17:13.135 Execution getVersion
[INFO] 18:17:13.135 SonarQube version: 6.7.3
[INFO] 18:17:13.145 Default locale: "de_DE", source code encoding: "windows-1252" (analysis is platform dependent)
[DEBUG] 18:17:13.155 Work directory: C:\AZ_DATEN\eclipse_workspaces_wolfgang\ee-sonar\wh.ee.sonar.testcode\target\sonar
[DEBUG] 18:17:13.155 Execution execute
[INFO] 18:17:13.495 Publish mode
[INFO] 18:17:13.625 Load global settings
[DEBUG] 18:17:13.675 GET 200 http://localhost:9000/api/settings/values.protobuf | time=40ms
[INFO] 18:17:13.695 Load global settings (done) | time=70ms
[INFO] 18:17:13.705 Server id: AWM6yHihy8FLWfRw_WR1
[INFO] 18:17:13.705 User cache: C:\Users\[REDACTED]\.sonar\cache
[INFO] 18:17:13.915 Load plugins index
[DEBUG] 18:17:13.925 GET 200 http://localhost:9000/api/plugins/installed | time=10ms
[INFO] 18:17:13.975 Load plugins index (done) | time=60ms
[DEBUG] 18:17:13.975 Load plugins
[DEBUG] 18:17:13.985 Load plugins (done) | time=10ms
[DEBUG] 18:17:14.065 Plugins:
[DEBUG] 18:17:14.065 Â * SonarC# 6.5.0.3766 (csharp)
[DEBUG] 18:17:14.065 Â * SonarPython 1.8.0.1496 (python)
[DEBUG] 18:17:14.065 Â * SonarJava 5.3.0.13828 (java)
[DEBUG] 18:17:14.065 Â * sonar-testwh-plugin 0.2.8 (testwh)
[DEBUG] 18:17:14.065 Â * Flex 2.3 (flex)
[DEBUG] 18:17:14.065 Â * SonarQube :: Plugins :: SCM :: Git 1.3.0.869 (scmgit)
[DEBUG] 18:17:14.065 Â * SonarXML 1.4.3.1027 (xml)
[DEBUG] 18:17:14.065 Â * SonarPHP 2.11.0.2485 (php)
[DEBUG] 18:17:14.075 Â * SonarTS 1.1.0.1079 (typescript)
[DEBUG] 18:17:14.075 Â * SonarQube :: Plugins :: SCM :: SVN 1.6.0.860 (scmsvn)
[DEBUG] 18:17:14.075 Â * SonarJS 3.2.0.5506 (javascript)
[INFO] 18:17:14.446 Process project properties
[DEBUG] 18:17:14.455 Process project properties (done) | time=9ms
[INFO] 18:17:14.497 Load project repositories
[DEBUG] 18:17:14.517 GET 200 http://localhost:9000/batch/project.protobuf?key=wh.ee.sonar.testcode%3Awh.ee.sonar.testcode | time=20ms
[INFO] 18:17:14.607 Load project repositories (done) | time=110ms
[DEBUG] 18:17:14.951 Available languages:
[DEBUG] 18:17:14.951 Â * C# => "cs"
[DEBUG] 18:17:14.951 Â * Python => "py"
[DEBUG] 18:17:14.951 Â * Java => "java"
[DEBUG] 18:17:14.951 Â * Flex => "flex"
[DEBUG] 18:17:14.951 Â * XML => "xml"
[DEBUG] 18:17:14.951 Â * PHP => "php"
[DEBUG] 18:17:14.951 Â * TypeScript => "ts"
[DEBUG] 18:17:14.951 Â * JavaScript => "js"
[INFO] 18:17:14.961 Load quality profiles
[DEBUG] 18:17:15.063 GET 200 http://localhost:9000/api/qualityprofiles/search.protobuf?projectKey=wh.ee.sonar.testcode%3Awh.ee.sonar.testcode | time=102ms
[INFO] 18:17:15.073 Load quality profiles (done) | time=112ms
[INFO] 18:17:15.083 Load active rules
[DEBUG] 18:17:15.193 GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWM6yKx-y8FLWfRw_WsO&p=1&ps=500 | time=110ms
[DEBUG] 18:17:15.263 GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWM_fvyX7U2voexxSua_&p=1&ps=500 | time=30ms
[DEBUG] 18:17:15.303 GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWM6yLEfy8FLWfRw_W5U&p=1&ps=500 | time=40ms
[DEBUG] 18:17:15.333 GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWM6yLCjy8FLWfRw_W4V&p=1&ps=500 | time=30ms
[DEBUG] 18:17:15.363 GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWM6yLNCy8FLWfRw_W-6&p=1&ps=500 | time=30ms
[DEBUG] 18:17:15.393 GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWM6yLQMy8FLWfRw_XA5&p=1&ps=500 | time=30ms
[DEBUG] 18:17:15.413 GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWM6yLa7y8FLWfRw_XDq&p=1&ps=500 | time=20ms
[DEBUG] 18:17:15.433 GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AWM6yLvpy8FLWfRw_XEu&p=1&ps=500 | time=20ms
[INFO] 18:17:15.443 Load active rules (done) | time=360ms
[INFO] 18:17:15.443 Load metrics repository
[DEBUG] 18:17:15.453 GET 200 http://localhost:9000/api/metrics/search?f=name,description,direction,qualitative,custom&ps=500&p=1 | time=10ms
[INFO] 18:17:15.463 Load metrics repository (done) | time=20ms
[WARNING] 18:17:15.513 SCM provider autodetection failed. No SCM provider claims to support this project. Please use sonar.scm.provider to define SCM of your project.
[INFO] 18:17:15.513 Project key: wh.ee.sonar.testcode:wh.ee.sonar.testcode
[DEBUG] 18:17:15.513 Start recursive analysis of project modules
[INFO] 18:17:15.513 ------------- Â Scan wh.ee.sonar.testcode
[INFO] 18:17:15.603 Load server rules
[DEBUG] 18:17:15.703 GET 200 http://localhost:9000/api/rules/list.protobuf | time=100ms
[INFO] 18:17:15.713 Load server rules (done) | time=110ms
[INFO] 18:17:15.753 Base dir: C:\AZ_DATEN\eclipse_workspaces_wolfgang\ee-sonar\wh.ee.sonar.testcode
[INFO] 18:17:15.753 Working dir: C:\AZ_DATEN\eclipse_workspaces_wolfgang\ee-sonar\wh.ee.sonar.testcode\target\sonar
[INFO] 18:17:15.753 Source paths: src/main/java/wh/ee/sonar/testcode
[INFO] 18:17:15.753 Test paths: src/test/java
[INFO] 18:17:15.753 Source encoding: windows-1252, default locale: de_DE
[DEBUG] 18:17:15.833 Declared extensions of language C# were converted to sonar.lang.patterns.cs : **/*.cs
[DEBUG] 18:17:15.833 Declared extensions of language Python were converted to sonar.lang.patterns.py : **/*.py
[DEBUG] 18:17:15.833 Declared extensions of language Java were converted to sonar.lang.patterns.java : **/*.java,**/*.jav
[DEBUG] 18:17:15.833 Declared extensions of language Flex were converted to sonar.lang.patterns.flex : **/*.as
[DEBUG] 18:17:15.833 Declared extensions of language XML were converted to sonar.lang.patterns.xml : **/*.xml,**/*.xsd,**/*.xsl
[DEBUG] 18:17:15.833 Declared extensions of language PHP were converted to sonar.lang.patterns.php : **/*.php,**/*.php3,**/*.php4,**/*.php5,**/*.phtml,**/*.inc
[DEBUG] 18:17:15.833 Declared extensions of language TypeScript were converted to sonar.lang.patterns.ts : **/*.ts,**/*.tsx
[DEBUG] 18:17:15.833 Declared extensions of language JavaScript were converted to sonar.lang.patterns.js : **/*.js,**/*.jsx,**/*.vue
[DEBUG] 18:17:15.843 Initializers :
[INFO] 18:17:15.843 Index files
[DEBUG] 18:17:15.853 'src\main\java\wh\ee\sonar\testcode\TestCode.java' indexed with language 'java'
[DEBUG] 18:17:15.853 'src\main\java\wh\ee\sonar\testcode\TestEnum.java' indexed with language 'java'
[DEBUG] 18:17:15.853 'src\main\java\wh\ee\sonar\testcode\MyClass.java' indexed with language 'java'
[INFO] 18:17:15.853 3 files indexed
[INFO] 18:17:15.853 Quality profile for java: ee-test
[DEBUG] 18:17:16.535 'Generic Coverage Report' skipped because one of the required properties is missing
[DEBUG] 18:17:16.535 'Generic Test Executions Report' skipped because one of the required properties is missing
[DEBUG] 18:17:16.535 'C#' skipped because there is no related file in current project
[DEBUG] 18:17:16.535 'C# Tests Coverage Report Import' skipped because there is no related file in current project
[DEBUG] 18:17:16.535 '[Deprecated] C# Integration Tests Coverage Report Import' skipped because there is no related file in current project
[DEBUG] 18:17:16.535 'C# Unit Test Results Import' skipped because there is no related file in current project
[DEBUG] 18:17:16.535 'Python Squid Sensor' skipped because there is no related file in current project
[DEBUG] 18:17:16.536 'Flex' skipped because there is no related file in current project
[DEBUG] 18:17:16.536 'Flex Cobertura' skipped because there is no related file in current project
[DEBUG] 18:17:16.536 'XML Sensor' skipped because there is no related file in current project
[DEBUG] 18:17:16.536 'PHP sensor' skipped because there is no related file in current project
[DEBUG] 18:17:16.536 'TypeScript Sensor' skipped because there is no related file in current project
[DEBUG] 18:17:16.536 'TypeScript LCOV Coverage Sensor' skipped because there is no related file in current project
[DEBUG] 18:17:16.536 'JavaScript Squid Sensor' skipped because there is no related file in current project
[DEBUG] 18:17:16.536 'Generic Coverage Report' skipped because one of the required properties is missing
[DEBUG] 18:17:16.536 'Generic Test Executions Report' skipped because one of the required properties is missing
[DEBUG] 18:17:16.536 'C#' skipped because there is no related file in current project
[DEBUG] 18:17:16.536 'C# Tests Coverage Report Import' skipped because there is no related file in current project
[DEBUG] 18:17:16.536 '[Deprecated] C# Integration Tests Coverage Report Import' skipped because there is no related file in current project
[DEBUG] 18:17:16.536 'C# Unit Test Results Import' skipped because there is no related file in current project
[DEBUG] 18:17:16.536 'Python Squid Sensor' skipped because there is no related file in current project
[DEBUG] 18:17:16.536 'Flex' skipped because there is no related file in current project
[DEBUG] 18:17:16.536 'Flex Cobertura' skipped because there is no related file in current project
[DEBUG] 18:17:16.536 'XML Sensor' skipped because there is no related file in current project
[DEBUG] 18:17:16.536 'PHP sensor' skipped because there is no related file in current project
[DEBUG] 18:17:16.536 'TypeScript Sensor' skipped because there is no related file in current project
[DEBUG] 18:17:16.536 'TypeScript LCOV Coverage Sensor' skipped because there is no related file in current project
[DEBUG] 18:17:16.536 'JavaScript Squid Sensor' skipped because there is no related file in current project
[DEBUG] 18:17:16.536 Sensors : JavaSquidSensor -> SurefireSensor -> JaCoCoSensor -> SonarJavaXmlFileSensor -> Analyzer for "php.ini" files -> Zero Coverage Sensor -> CPD Block Indexer
[INFO] 18:17:16.536 Sensor JavaSquidSensor [java]
[INFO] 18:17:16.707 Configured Java source version (sonar.java.source): 5
[DEBUG] 18:17:16.727 com.sonar.plugins.security.api.JavaRules is not found, no security rules added to Sonar way java profile: com.sonar.plugins.security.api.JavaRules
[INFO] 18:17:16.727 JavaClasspath initialization
[WARNING] 18:17:16.737 Bytecode of dependencies was not provided for analysis of source files, you might end up with less precise results. Bytecode can be provided using sonar.java.libraries property
[INFO] 18:17:16.737 JavaClasspath initialization (done) | time=10ms
[INFO] 18:17:16.747 JavaTestClasspath initialization
[INFO] 18:17:16.747 JavaTestClasspath initialization (done) | time=0ms
[DEBUG] 18:17:17.027 ----- Classpath analyzed by Squid:
[DEBUG] 18:17:17.027 C:\AZ_DATEN\eclipse_workspaces_wolfgang\ee-sonar\wh.ee.sonar.testcode\target\classes
[DEBUG] 18:17:17.027 -----
[DEBUG] 18:17:17.027 ----- Classpath analyzed by Squid:
[DEBUG] 18:17:17.027 C:\AZ_DATEN\eclipse_workspaces_wolfgang\ee-sonar\wh.ee.sonar.testcode\target\test-classes
[DEBUG] 18:17:17.027 C:\AZ_DATEN\eclipse_workspaces_wolfgang\ee-sonar\wh.ee.sonar.testcode\target\classes
[DEBUG] 18:17:17.027 -----
[INFO] 18:17:17.027 Java Main Files AST scan
[INFO] 18:17:17.027 3 source files to be analyzed
[DEBUG] 18:17:17.047 'src/main/java/wh/ee/sonar/testcode/MyClass.java' generated metadata  with charset 'windows-1252'
[DEBUG] 18:17:17.179 .class not found for wh.ee.sonar.testcode.wh
[DEBUG] 18:17:17.180 .class not found for java.lang.package-info
[DEBUG] 18:17:17.180 .class not found for java.lang.wh
[DEBUG] 18:17:17.180 .class not found for java.lang.Synthetic$wh
[DEBUG] 18:17:17.180 .class not found for wh.ee
[DEBUG] 18:17:17.180 .class not found for wh.ee.sonar
[INFO] 18:17:17.249 Scanning: MyClass.java
[DEBUG] 18:17:17.269 'src/main/java/wh/ee/sonar/testcode/TestCode.java' generated metadata  with charset 'windows-1252'
[DEBUG] 18:17:17.309 .class not found for wh.ee.sonar.testcode.wh
[DEBUG] 18:17:17.309 .class not found for java.lang.package-info
[DEBUG] 18:17:17.309 .class not found for java.lang.wh
[DEBUG] 18:17:17.309 .class not found for java.lang.Synthetic$wh
[DEBUG] 18:17:17.309 .class not found for wh.ee
[DEBUG] 18:17:17.309 .class not found for wh.ee.sonar
[INFO] 18:17:17.319 Scanning: TestCode.java
[INFO] 18:17:17.319 identifier tree symbol: t
[INFO] 18:17:17.349 identifier tree symbol: TestEnum
[INFO] 18:17:17.349 identifier tree symbol: TEST1
[INFO] 18:17:17.349 identifier tree symbol: equals
[INFO] 18:17:17.349 identifier tree symbol: t
[INFO] 18:17:17.349 identifier tree symbol: TestEnum
[INFO] 18:17:17.349 identifier tree symbol: TEST2
[INFO] 18:17:17.349 identifier tree symbol: equals
[INFO] 18:17:17.349 identifier tree symbol: t
[DEBUG] 18:17:17.359 'src/main/java/wh/ee/sonar/testcode/TestEnum.java' generated metadata  with charset 'windows-1252'
[DEBUG] 18:17:17.379 .class not found for wh.ee.sonar.testcode.wh
[DEBUG] 18:17:17.379 .class not found for java.lang.package-info
[DEBUG] 18:17:17.379 .class not found for java.lang.wh
[DEBUG] 18:17:17.379 .class not found for java.lang.Synthetic$wh
[DEBUG] 18:17:17.379 .class not found for wh.ee
[DEBUG] 18:17:17.379 .class not found for wh.ee.sonar
[INFO] 18:17:17.389 Scanning: TestEnum.java
[INFO] 18:17:17.389 3/3 source files have been analyzed
[INFO] 18:17:17.389 Java Main Files AST scan (done) | time=362ms
[INFO] 18:17:17.389 Java Test Files AST scan
[INFO] 18:17:17.389 0 source files to be analyzed
[INFO] 18:17:17.389 Java Test Files AST scan (done) | time=0ms
[INFO] 18:17:17.399 Sensor JavaSquidSensor [java] (done) | time=863ms
[INFO] 18:17:17.399 Sensor SurefireSensor [java]
[INFO] 18:17:17.399 0/0 source files have been analyzed
[INFO] 18:17:17.399 parsing [C:\AZ_DATEN\eclipse_workspaces_wolfgang\ee-sonar\wh.ee.sonar.testcode\target\surefire-reports]
[INFO] 18:17:17.399 Sensor SurefireSensor [java] (done) | time=0ms
[INFO] 18:17:17.399 Sensor JaCoCoSensor [java]
[INFO] 18:17:17.399 Sensor JaCoCoSensor [java] (done) | time=0ms
[INFO] 18:17:17.399 Sensor SonarJavaXmlFileSensor [java]
[INFO] 18:17:17.399 Sensor SonarJavaXmlFileSensor [java] (done) | time=0ms
[INFO] 18:17:17.399 Sensor Analyzer for "php.ini" files [php]
[INFO] 18:17:17.399 Sensor Analyzer for "php.ini" files [php] (done) | time=0ms
[INFO] 18:17:17.399 Sensor Zero Coverage Sensor
[INFO] 18:17:17.419 Sensor Zero Coverage Sensor (done) | time=20ms
[INFO] 18:17:17.419 Sensor CPD Block Indexer
[DEBUG] 18:17:17.419 org.sonar.scanner.cpd.deprecated.JavaCpdBlockIndexer is used for java
[DEBUG] 18:17:17.429 Populating index from src/main/java/wh/ee/sonar/testcode/MyClass.java
[DEBUG] 18:17:17.429 Not enough content in 'src/main/java/wh/ee/sonar/testcode/MyClass.java' to have CPD blocks, it will not be part of the duplication detection
[DEBUG] 18:17:17.429 Populating index from src/main/java/wh/ee/sonar/testcode/TestCode.java
[DEBUG] 18:17:17.439 Not enough content in 'src/main/java/wh/ee/sonar/testcode/TestCode.java' to have CPD blocks, it will not be part of the duplication detection
[DEBUG] 18:17:17.439 Populating index from src/main/java/wh/ee/sonar/testcode/TestEnum.java
[DEBUG] 18:17:17.439 Not enough content in 'src/main/java/wh/ee/sonar/testcode/TestEnum.java' to have CPD blocks, it will not be part of the duplication detection
[INFO] 18:17:17.439 Sensor CPD Block Indexer (done) | time=20ms
[INFO] 18:17:17.439 No SCM system was detected. You can use the 'sonar.scm.provider' property to explicitly specify it.
[INFO] 18:17:17.439 3 files had no CPD blocks
[INFO] 18:17:17.439 Calculating CPD for 0 files
[INFO] 18:17:17.439 CPD calculation finished
[INFO] 18:17:17.549 Analysis report generated in 100ms, dir size=33 KB
[INFO] 18:17:17.589 Analysis reports compressed in 40ms, zip size=11 KB
[INFO] 18:17:17.589 Analysis report generated in C:\AZ_DATEN\eclipse_workspaces_wolfgang\ee-sonar\wh.ee.sonar.testcode\target\sonar\scanner-report
[DEBUG] 18:17:17.589 Upload report
[DEBUG] 18:17:17.619 POST 200 http://localhost:9000/api/ce/submit?projectKey=wh.ee.sonar.testcode:wh.ee.sonar.testcode&projectName=wh.ee.sonar.testcode | time=30ms
[INFO] 18:17:17.629 Analysis report uploaded in 40ms
[INFO] 18:17:17.629 ANALYSIS SUCCESSFUL, you can browse http://localhost:9000/dashboard/index/wh.ee.sonar.testcode:wh.ee.sonar.testcode
[INFO] 18:17:17.629 Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
[INFO] 18:17:17.629 More about the report processing at http://localhost:9000/api/ce/task?id=AWOIo_kzX9AJE-EBfQKr
[DEBUG] 18:17:17.629 Report metadata written to C:\AZ_DATEN\eclipse_workspaces_wolfgang\ee-sonar\wh.ee.sonar.testcode\target\sonar\report-task.txt
[DEBUG] 18:17:17.639 Post-jobs :
[INFO] 18:17:17.639 Task total time: 3.554 s
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.366 s
[INFO] Finished at: 2018-05-22T18:17:18+02:00
[INFO] Final Memory: 19M/418M
[INFO] ------------------------------------------------------------------------