How are the rules for visual studio designed?

hi good afternoon

  1. I’m looking for information on how to create new rules to validate the code in visual studio for windows .

  2. Also according to validate that sound has a complement in visual xpress (SonarLint), do they have any difference between the different versions for example visual studio communiti, visual express studio and etc …?