However there should be a way to do the same using the brand new sonnar scanner maybe the sonar.working.directory parameter would do the trick, the documentation says this:
sonar.working.directory
Set the working directory for an analysis triggered with the SonarScanner or the SonarScanner for Ant (versions greater than 2.0). This property is not compatible with the SonarScanner for MSBuild. Path must be relative, and unique for each project. Beware: the specified folder is deleted before each analysis.
Please add support to scan a single file, the old
sonar-runner
would implementation would look like this:sonar-runner -Dsonar.inclusions=src/main/java/com/foo/MyClass.java
However there should be a way to do the same using the brand new
sonnar scanner
maybe thesonar.working.directory
parameter would do the trick, the documentation says this:Also maybe the narrowing focus section explains some exclusion/inclusions that may help.
The expected UI should look somethign like this: