Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Updating from StyleCop 4.7 (Classic) to StyleCop.Analyzers

I am upgrading stylecop classic to the latest version (StyleCop.Analyzers 1.0.0) in my VS2015 and based on the introductions from GitHub, I cannot use Settings.StyleCop anymore but to create a new stylecop.json file.

Now the question is I do have some custom settigns inside the settings.StyleCop like "recognized words" in Spelling tab, and certain options inside Options Tab. How do I add them in the json file? Couldn't find anything on their github site about this. Please help.

like image 850
Kyle Avatar asked Dec 14 '25 00:12

Kyle


1 Answers

All config options are documented here: Configuration.md

The analyzers project removed spell checking in favor of performance (see Issue 1057)

Several documentation rules are subjective and aim to establish the quality of documentation content. These rules take CPU time to evaluate and are an overall poor indicator of documentation quality. I believe with the rules in place, developers will be focused on the wrong aspects of documentation during the development process.

SA1628: Documentation text must begin with a capital letter
SA1630: Documentation text must contain whitespace
SA1631: Documentation must meet character percentage
SA1632: Documentation text must meet minimum character length
SA1650: Element documentation must be spelled correctly

I propose that each of these rules be permanently disabled in StyleCopAnalyzers.

Regarding spell checking,

You might consider using Code Analysis + Code Analysis Dictionary. (EX: CA1704: Identifiers should be spelled correctly)

Another option would be to use a visual studio plugin centered around spelling (see Visual Studio Spell Checker Extension)

like image 161
felickz Avatar answered Dec 16 '25 22:12

felickz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!