Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Ruleset files using include
mathiasv
#1 Posted : Tuesday, January 16, 2018 3:40:45 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 7/3/2013(UTC)
Posts: 2
Location: Denmark

It seems ncrunch doesn't properly detect and copy ruleset files that are included inside other ruleset files, resulting in a bunch of warnings being output when they should be supressed.

An example scenario, is using stylecop, but wanting to suppress certain rules, for example in tests:
Quote:

<RuleSet Name="StyleCop Tests Rule Set" Description="These rules focus on enforcing a consistent code style in tests." ToolsVersion="15.0">
<Include Path="stylecop.ruleset" Action="Default" />
<Include Path="stylecop.nodocs.ruleset" Action="Default" />
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
<Rule Id="SA1118" Action="None" />
</Rules>
</RuleSet>


The rules specified directly in this file work, but those coming from Include do not.
I can imagine this is because they are not copied to ncrunch's workspace.

I know that I could go in and tell ncrunch to explicitly include this, but that is easier said than done if working with multiple projects that all use the same ruleset.
Remco
#2 Posted : Tuesday, January 16, 2018 10:46:56 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,123

Thanks: 957 times
Was thanked: 1286 time(s) in 1193 post(s)
Thanks for sharing this. I'm not sure how easily this can be resolved to a specific file using NCrunch's MSBuild integration, but will put it on the list to take a look. 'Additional files to include' is the correct workaround for now.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.027 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download