File type exclusion using sonar-project.properties file

Template for a good new topic, formatted with Markdown:

  • ALM used (GitHub)
  • CI system used (Travis CI)
  • Languages of the repository: GoLang
  • We are using SonarCloud.io

I’m trying to configure the analysis so that it excludes the HTML files using sonar-project.properties. I’ve added sonar-project.properties file to the root directory. In this file I’ve added the following two lines,

sonar.coverage.exclusions=**/*.html
sonar.exclusions=**/*.html

Still see the analysis result reports errors in these files.

How should I fix this?

Hi Ahmed,

Welcome to the SonarSource Community!

You should not need sonar.exclusions and sonar.coverage.exclusions as sonar.exclusions supresses those files entirely.

I’ll suggest that you use the debug (-X) in your Travis scan task. The scanner will output more details on what files are ignored on the file path. If the issue is not apparent, post this debug log here so e can take a look.

Cheers!

Brian