Supressing rules in gradle.properties

Must-share information (formatted with Markdown):
versions:
Gradle plugin version 5.0.0.4638 (latest)
Docker image version sonarqube:latest

I’m trying to suppress rules in gradle.properties

Other systemProp.sonar.* properties seem to work but this block does not.

# suppressions; these don't seem to work?
systemProp.sonar.issue.ignore.multicriteria=kotlin-S6629,kotlin-S6624,kotlin-S6517,java-S4032,java-S120
# Group dependencies by their destination
systemProp.sonar.issue.ignore.multicriteria.kotlin-S6629.ruleKey=kotlin:S6629
systemProp.sonar.issue.ignore.multicriteria.kotlin-S6629.resourceKey=**
# Do not hardcode version numbers
systemProp.sonar.issue.ignore.multicriteria.kotlin-S6624.ruleKey=kotlin:S6624
systemProp.sonar.issue.ignore.multicriteria.kotlin-S6624.resourceKey=**
# Make this interface functional or replace it with a function type
systemProp.sonar.issue.ignore.multicriteria.kotlin-S6517.ruleKey=kotlin:S6517
systemProp.sonar.issue.ignore.multicriteria.kotlin-S6517.resourceKey=**/*Mapper.kt,**/Repository*.kt
# Packages containing only "package-info.java" should be removed
systemProp.sonar.issue.ignore.multicriteria.java-S4032.ruleKey=java:S4032
systemProp.sonar.issue.ignore.multicriteria.java-S4032.resourceKey=**/package-info.java
# Package names should comply with a naming convention
systemProp.sonar.issue.ignore.multicriteria.java-S120.ruleKey=java:S120
systemProp.sonar.issue.ignore.multicriteria.java-S120.resourceKey=**

Hi,

Welcome to the community!

I generally advise use of the UI to configure exclusions for exactly this reason. Although even via the UI, I think you need a resource key of **/* rather than just ** (i.e. 0-n directories).

That said, your use of systemProp properties is an attempt to configure the scanner, rather than the individual analysis. Meaning that you’re trying to turn these rules off for every project. So why not just remove them from your Quality Profile?

 
HTH,
Ann

This is checked in to an individual project, so these settings are project specific.

I want changes tracked in source control, not made through the UI.

I’ll try the **/* notation, thanks.

**/* still isn’t working. Should I be using another property prefix other than systemProp?

Hi,

Can you try setting this through the UI so we can eliminate that as a variable?

 
Ann