Right syntax for sonar ignore issue block

Hi,

I am using Sonarqube, configured in pom.xml, maven configuration.
Can you please suggest to me the below syntax is valid?

<sonar.issue.ignore.block>
beginBlockRegexp=@sonarDisableStart
endBlockRegexp=@sonarDisableEnd
</sonar.issue.ignore.block>

Hey there.

We suggest that these settings should only be set in the UI (project level Administration > Analysis Scope).

And for what it’s worth, here’s a user who managed to make it work:

Hello @Colin, I tried setting regex in UI and use them in my code but they don’t seem to be working. I am using C language. Do you have any suggestions on how exactly I can make use of sonar.issue.ignore.block. I would like to ignore a block of code from scanning for errors.

@Badram You’ll have to provide more details about what you’ve tried so far!

  • What regex pattern did you use?
  • The specific code where you tried to implement the start/end block?
  • How did you determine that it didn’t work as intended?

And I suggest you do this all in a new thread, instead of reviving a thread that is 3 years old. I will close this one.