Reputation:
I am requiring to analyze roughly 50 java files, and do not want to analyze them one by one when editing the configuration file. How do I enter in a directory, and it automatically detects all the java files in the directory and perform code analysis on all the java files?
Edit:
The components I have added to the configuration file is :
sonar.projectKey=three
sonar.projectName=three
sonar.projectVersion=1.0
sonar.sources = C:/Users/x/Desktop/project/projectY/projectZ/src
sonar.inclusions = C:/Users/x/Desktop/project/projectY/projectZ/src/**/*.java
Inside src are two directories, and inside those sub directories further down contain all the java files I want to analyze. Windows 10 62bit os.
It is recognizing 39 files, but it says it is ignored.
0 files indexed
39 files ignored because of inclusion/exclusion patterns
Upvotes: 0
Views: 55
Reputation: 4754
there is one simple answer: Read the docs -> sonarqube is pretty well documented
https://docs.sonarqube.org/display/SONAR/Narrowing+the+Focus
sonar.inclusions
is the property you are looking for, and how you can work with patterns, is explained in the docs.
sonar.inclusions=src/net/something/**/*.java
Upvotes: 2