- SonarQube: 8.3.1.34397
All settings made in the UI
I have a project in which I want to scan all C source files and I also have gcov reports, but I only want to report on code coverage on the c sources in the src directory. My project level settings are:
- sonar.inclusions - **/*.c
- sonar.test.inclusions - src/*.c
When scanning this project, then scanner reports the following information:
INFO: Project configuration:
INFO: Included sources: **/*.c
INFO: Excluded sources: src/*.c
INFO: Included tests: src/*.c
INFO: 75 files indexed
INFO: 1097 files ignored because of inclusion/exclusion patterns
INFO: 0 files ignored because of scm ignore settings
I have tried resetting the the UI parameters back to 0, adding/deleting no matter what, it seems that if I add src/*.c to the test inclusions, the scanner detects that as a source exclusion even though the source.exclusions field is empty in the UI. I have checked that the global exclusions field is also empty.
What could possibly be related is that this project used to exist with god knows what settings, but I deleted the project and then re-added a new one with the same key. Is it possible the old key exists somewhere in the DB and wasn’t properly flushed?
I have restarted the sonar server and the issue still persists.
Is this a bug or am I just not understanding the behavior of sonar.test.inclusion?