Must-share information:
- SonarQube Server Enterprise Edition v2025.4.2 and Visual studio IDE Version: 9.1.0.15828.
- I want to exclude all files in a folder.
- Setting sonar.exclusions to ArduinoJson/**/*.*
I am using a windows agent on DevOps to build my c++ project with the SonarQubePrepare@7 and extraProperties as below.
extraProperties: |
sonar.cfamily.compile-commands=bw_output/compile_commands.json
sonar.cfamily.vscoveragexml.reportsPath=$(Agent.TempDirectory)/TestResults/**/*.xml
sonar.projectName=airfield - alcms - dungeon - $(Build.Repository.Name)
sonar.exclusions=${{ parameters['SonarQubeExclusions'] }}${{ parameters['SonarQubeAdditionalExclusions'] }}
sonar.verbose=true
sonar.projectVersion=$(Build.SourceVersion)
sonar.newCode.referenceBranch=main
When I build I get some warnings from files in the folder ArduinoJson and when looking in the Code tab in SonarQube server I can see it is analysing docker files in that folder. There are also c++ and header files in the folder that is not analysed. So the exclude is working for some files.
This is the output when analysing:
10:33:45.780 INFO Load project repositories (done) | time=293ms
10:33:45.808 DEBUG Available languages:
10:33:45.809 DEBUG * C => "c"
10:33:45.809 DEBUG * C++ => "cpp"
10:33:45.810 DEBUG * Objective-C => "objc"
10:33:45.810 DEBUG * XML => "xml"
10:33:45.810 DEBUG * JavaScript => "js"
10:33:45.810 DEBUG * TypeScript => "ts"
10:33:45.810 DEBUG * CSS => "css"
10:33:45.811 DEBUG * Secrets => "secrets"
10:33:45.811 DEBUG * Text => "text"
10:33:45.811 DEBUG * Ansible => "ansible"
10:33:45.811 DEBUG * Terraform => "terraform"
10:33:45.812 DEBUG * CloudFormation => "cloudformation"
10:33:45.812 DEBUG * Kubernetes => "kubernetes"
10:33:45.812 DEBUG * Docker => "docker"
10:33:45.812 DEBUG * AzureResourceManager => "azureresourcemanager"
10:33:45.812 DEBUG * YAML => "yaml"
10:33:45.813 DEBUG * JSON => "json"
10:33:45.816 INFO Indexing files...
10:33:45.816 INFO Project configuration:
10:33:45.817 INFO Excluded sources: **/Version.h, **/resource.h, UnitTest/**/*.*, ArduinoJson/**/*.*
10:33:45.825 DEBUG '.azuredevops/pull_request_template/branches/main.md' indexed with no language
10:33:45.829 DEBUG '.gitignore' indexed with no language
10:33:45.829 DEBUG '.gitmodules' indexed with no language
10:33:45.830 DEBUG 'ArduinoJson/.devcontainer/clang13/Dockerfile' indexed with language 'docker'
10:33:45.830 DEBUG 'ArduinoJson/.devcontainer/clang14/Dockerfile' indexed with language 'docker'
10:33:45.830 DEBUG 'ArduinoJson/.devcontainer/clang15/Dockerfile' indexed with language 'docker'
10:33:45.831 DEBUG 'ArduinoJson/.devcontainer/clang16/Dockerfile' indexed with language 'docker'
10:33:45.831 DEBUG 'ArduinoJson/.devcontainer/clang17/Dockerfile' indexed with language 'docker'
10:33:45.831 DEBUG 'ArduinoJson/.devcontainer/gcc12/Dockerfile' indexed with language 'docker'
10:33:45.832 DEBUG 'ArduinoJson/extras/fuzzing/Makefile' indexed with no language
10:33:45.833 DEBUG 'ArduinoJson/extras/fuzzing/msgpack_seed_corpus/array16' indexed with no language
10:33:45.833 DEBUG 'ArduinoJson/extras/fuzzing/msgpack_seed_corpus/array32' indexed with no language
10:33:45.834 DEBUG 'ArduinoJson/extras/fuzzing/msgpack_seed_corpus/false' indexed with no language
10:33:45.836 DEBUG 'ArduinoJson/extras/fuzzing/msgpack_seed_corpus/fixarray' indexed with no language
10:33:45.836 DEBUG 'ArduinoJson/extras/fuzzing/msgpack_seed_corpus/fixint_negative' indexed with no language
10:33:45.840 DEBUG 'ArduinoJson/extras/fuzzing/msgpack_seed_corpus/fixint_positive' indexed with no language
10:33:45.841 DEBUG 'ArduinoJson/extras/fuzzing/msgpack_seed_corpus/fixmap' indexed with no language
10:33:45.899 DEBUG 'ArduinoJson/extras/fuzzing/msgpack_seed_corpus/fixstr' indexed with no language
10:33:45.901 DEBUG 'ArduinoJson/extras/fuzzing/msgpack_seed_corpus/float32' indexed with no language
10:33:45.903 DEBUG 'ArduinoJson/extras/fuzzing/msgpack_seed_corpus/float64' indexed with no language
10:33:45.904 DEBUG 'ArduinoJson/extras/fuzzing/msgpack_seed_corpus/int16' indexed with no language
10:33:45.904 DEBUG 'ArduinoJson/extras/fuzzing/msgpack_seed_corpus/int32' indexed with no language
10:33:45.905 DEBUG 'ArduinoJson/extras/fuzzing/msgpack_seed_corpus/int64' indexed with no language
10:33:45.905 DEBUG 'ArduinoJson/extras/fuzzing/msgpack_seed_corpus/int8' indexed with no language
10:33:45.906 DEBUG 'ArduinoJson/extras/fuzzing/msgpack_seed_corpus/map16' indexed with no language
Any suggestion why the docker files are analysed ?
Thanks