I am following instructions based on documentation: SQ Rules
I am trying to modify an existing rule which does not seem possible. Instead, you should create a rule from an existing one. That sounds fine but I do not see any C# templates. I have selected the Show Template Only filter and all I gain access to is 13 templates none of which are C#. Shouldn’t there be more?
Is there something I am doing wrong or maybe there are no C# templates? Any help would be appreciated.
I want to modify the rule: Types should be named in PascalCase to allow for some special conditions such that “class MyClassDTO” is compliant. I am imaging that I can change something in the way the rule invokes (such as a regex expression) that will make it work the way I want. Optionally, I can create a new rule. I don’t understand how to do that.
When I am on the Rules tab, I have the rule selected and my custom quality profile (not the default one). The Change button only allows me to change the severity of the rule, not the rule itself. The Extend Description button allows be to add description (I think). What I don’t see is how to edit the rule or even to see how it works under the covers.
If I follow the doc instructions, it says to select the Show Templates Only filter. This shows 13 templates. I was expecting more but perhaps that was wrong. Why am I only seeing 13 templates? Is that all that is needed to produce all the rules in SQ?
Continuing…I can create a new custom rule from a template - that works but I really don’t know what I am doing just yet. I wanted to see the how the Types should be named in PascalCase rule was created so that I could just tweak it a little. For example, I could create a new rule based on the Track uses of disallowed classes but I need to come up with a regex pattern. Where can I find the regex pattern used by the Types should be named in PascalCase rule so I don’t have to do this from scratch?
Thanks for the options. Out of curiosity, why are there no C# templates? Is that a paid version exclusive? And if no C# templates, then how are the C# files analyzed? Where are the rules?
Sorry for the delay @smyrin. You can check the rules implementation on our github repo. Our code is open source. Our analyzers are Roslyn analyzers, and you can create a Roslyn analyzer as well (see Microsoft docs)