Is there a way to suppress Code Smells with data annotation?

Hi,

I have some Code Smell that I don’t want to see in Sonar.
Is there a way of adding data annotation or something to ignore my method being analyzed for Code Smells?

Thank you!

Hey there.

There are a few options for ignoring issues – what language(s) are you analyzing?

1 Like

Hi Colin,

I’m using C#.

Thank you!

Thanks.

It’s super easy for C#, where you can use the same methods as disabling any other rule (pragma disable or SuppressMessage).

1 Like

Thank you, Colin!