Need a simple and straightforward way/guide to add custom Quality Rules for C# language

I have a SonarQube Server and By default, there are 249 Quality rules for C# present. I want to add more Custom rules. I did a search but all explanations are confusing regards to third-party rules fetching process.


As described in the docs

Issues from third-party Roslyn analyzers (including Roslyn analyzers provided by Microsoft) are included in the MSBuild output and imported by default into SonarQube

So your straightforward way is to implement Roslyn analyzers and run them during your build.