-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NuGet package should provide AllDisabled ruleset\config #709
Comments
@payn-git Just to be sure I understand, but you mean something like this dotnet/roslyn-analyzers#1718 that provides a lot of rulesets? |
Yes that's correct. Although, Im mostly interested only in AllDisabled variation of it as all projects are setup differently and I don't know anybody who have all enabled or all enabled per category etc. However, if all disabled\enabled\default version will be provided that would not harm anybody. Also please be aware that Microsoft provide both *.ruleset and also new *.config. In all our projects we use *.ruleset as that's more flexible than config files. |
@payn-git Microsoft has deprecated rulesets. But I see they still supplies them with the analyzer. Just out of interest, why do you think rulesets are more flexible? Is that because you can reference them conditionally? At my work we use <ItemGroup>
<GlobalAnalyzerConfigFiles Include="$(NUnitAnalyzerConfigLocation)" />
</ItemGroup> @mikkelbu We should create these files automatically and check them in test to ensure new rules got added. Similar to what we for the documentation index. |
Its about ruleset hierarchy itself. In my personal POV Microsoft did terrible job with *.EditroConfig files which work on folder hierarchy structure. In old ruleset we can enforce rulesets hierarchy from any locations by using include which is widely used in corporate big projects. So I can do something like this. As far as I know there is not direct inclusion possible with *.EditroConfig. There was request in Git for Microsoft to provide same ability instead of cluttering folder structure approach, but as far as I know it was never resolved. One of those things which was perfectly fine, but Microsoft had to change them to make things worse :). |
Ruleset config example which was cut off from previous comment. |
@mikkelbu @manfred-brands I have a related question: is it possible to enable all |
@Bartleby2718 I presume you don't want to see the default Microsoft Rules? |
Similar to Microsoft analyzers approach. NuGet package should always provide configuration for .ruleset and .config files with all rules listed as disabled. This is very often used on projects where project config derive from all disabled configuration and only individual rules required by project are enabled. Currently such all disabled ruleset have to be manually updated every time when new rule is included.. Simply replacing whole file with new version is much easier from maintenance point of view. As one doesn't need to spend time trying to figure out which rules was added to start with.
The text was updated successfully, but these errors were encountered: