Ansh Khattar
Ansh Khattar

Reputation: 1

Disable SonarJava Check

I am using code climate in my code, to check the code quality. This is my .codeclimate.yml:

version: '2'
plugins:
  sonar-java:
    enabled: true
    config:
      minimum_severity: critical
checks:
  S1192:
    enabled: false
exclude_patterns: []

I was getting a lot of "Define a constant instead of duplicating this literal" warning so I wanted to suppress it, and hence I used the code S1192. Event after adding this, the check is not suppressed.

I tried disabling that check, but that did not happen.

Upvotes: 0

Views: 60

Answers (1)

shubhammukati
shubhammukati

Reputation: 1

If you're not using Sonar and want to disable it from your Code Climate configuration, you can simply remove or comment out the sonar-java plugin section in your .codeclimate.yml file. Here's how you can adjust your configuration:

Updated .codeclimate.yml version: '2' plugins:

sonar-java:

enabled: true

config:

minimum_severity: critical

checks: S1192: enabled: false exclude_patterns: []

Upvotes: 0

Related Questions