Disabling code coverage for .js files not working

(Jonny) #1


I’m sure this is fairly easy to solve, but I haven’t managed to do it yet. I’m running SonarQube 6.7.4. We have a large Yii application and supporting js files ~4k lines. We are using Bamboo as our CI and Codeception as our testing framework. Ideally we’d like to keep the analysis of the js files, so we can make sure the js is of a decent quality, but we’d like to remove the coverage files for all js files.

In the codeception.yml file we have:

            - web/js/*

In our sonar.properties file we have:


Also in Administration > General Settings > Code Coverage > Coverage Exclusions
We are using **/js/*, but we’ve also used web/js/*, web/js/*.js and probably some others too. Not sure what we’re doing wrong, or if maybe some settings are conflicted?

But we manage to get the analysis, but the coverage is always included and 0%.

(Stas Vilchik) #2


Try web/js/**/*, that should exclude any file inside any nested directory.