I would like to be able to upload a custom rule and have it included in our standard Quality Profile

For example I want to flag usage of ExpandoObject or Tuple<T…> as a function return value. This is a problem I want to address rather immediately and dont want to subject it to community debate.

I can create an analyzer, but that has to be added to each project. Since we have > 1K repos, each with a handful of projects, adding an analyzer to all of the projects seems unreasonable, however authoring a custom rule and adding it to the sonar quality profile we are using would be a more reasonable and preferable approach…

Hello @StingyJack,

Thank you for the feature suggestion about the custom rules!

Regarding the problem you want to address with this - do you think it could be valuable for other developers as well? Or is it something specific to your use-case?

I can imagine there are probably types (and keywords - dynamic, unsafe, even static for some) of many kinds that different teams want to mark as forbidden from being used directly in code.

While being able to implement a custom rule would be good, there would also be value in having a rule to report usage of any types, keywords, and possibly other things (like specific identifier names) that have been configured to be forbidden