Can't ignore false positive code smells on DevOps PR

  • ALM used: Azure DevOps
  • CI system used: Azure DevOps
  • C#

A PR that is being scanned is detecting some false positives and I can’t mark them as such because the open status is disabled so I can’t change it (I don’t have the option in bulk change either). Also, I can change all other fields (assigned to, tags, severity and type) just not the status.

Why?

Hey there.

Can you share a screenshot of such an issue?

Screenshot:

We want to ignore it because the validation is being made, but in a method on the base class that is called in the line right before the error, by the 18 inheriting classes all failing with the same code smell.

Hey there.

This is an issue raised by native Roslyn analyzers and imported into SonarCloud, and they can’t be marked as FP/WF in SonarCloud.

You can turn these off entirely in your project-level Administration > External Analyzers > C# > Ignore issues from external Roslyn analyzers, or use something like #pragma disable to suppress the issue in-code (or other methods of suppressing Roslyn issues)

Ah understood, I didn’t know it behaved that way. Appreciate it, thanks!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.