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

Notification

Icon
Error

NCrunch does not seem to support editorconfig inheritance
ClausAppel3Shape
#1 Posted : Tuesday, April 21, 2020 8:12:08 AM(UTC)
Rank: Member

Groups: Registered
Joined: 11/21/2019(UTC)
Posts: 10
Location: Denmark

Thanks: 2 times
Was thanked: 2 time(s) in 1 post(s)
Hi! This is a follow-up to this thread from some months ago: https://forum.ncrunch.ne...e-warning-severity.aspx

I have this setup: I am using FxCop Analyzers and <WarningsAsErrors/>. In my C# solution I have a global .editorconfig file. In a test project I have an additional .editorconfig that overrides/extends the global one.

Problem: When building the test project, NCrunch only reads the local (overriding) .editorconfig file. It ignores the global .editorconfig. As a result, it reports some errors that I want it to ignore and then fails to compile.

If I didn't have the overriding .editorconfig I could solve it by adding a symlink to the global .editorconfig in each project (as in the thread linked above). Now that I have the overriding one, this trick no longer works.

Is there any way to solve this?

I'm using NCrunch 4.3.0.13, Visual Studio Professional 2019 version 16.4.6., C# 8.

Thanks!
Remco
#2 Posted : Tuesday, April 21, 2020 8:28:33 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi, thanks for posting.

I'm not particularly familiar with the mechanics of these files or their purpose, but is it possible that the global editorconfig file simply needs to be present inside the NCrunch workspace? If so, try adding it to the 'Additional files to include' in your NCrunch solution-level configuration.
ClausAppel3Shape
#3 Posted : Tuesday, April 21, 2020 8:40:09 AM(UTC)
Rank: Member

Groups: Registered
Joined: 11/21/2019(UTC)
Posts: 10
Location: Denmark

Thanks: 2 times
Was thanked: 2 time(s) in 1 post(s)
Remco;14639 wrote:
I'm not particularly familiar with the mechanics of these files or their purpose, but is it possible that the global editorconfig file simply needs to be present inside the NCrunch workspace? If so, try adding it to the 'Additional files to include' in your NCrunch solution-level configuration.

Thanks. Where do I set "Additional files to include"? I see no such setting when I go to Extensions -> NCrunch -> Configuration and search.
ejball
#5 Posted : Monday, June 22, 2020 2:00:48 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 3/3/2020(UTC)
Posts: 2
Location: United States of America

I solved this in NCrunch Configuration > General Settings > Build Settings > Custom build properties by adding RunAnalyzers = false.

Remco, you may want to do this automatically (unless Allow code analysis is true, presumably).

Documented here: https://docs.microsoft.c...#net-framework-projects
ClausAppel3Shape
#6 Posted : Monday, July 6, 2020 11:25:36 AM(UTC)
Rank: Member

Groups: Registered
Joined: 11/21/2019(UTC)
Posts: 10
Location: Denmark

Thanks: 2 times
Was thanked: 2 time(s) in 1 post(s)
ejball;14811 wrote:
I solved this in NCrunch Configuration > General Settings > Build Settings > Custom build properties by adding RunAnalyzers = false.

Remco, you may want to do this automatically (unless Allow code analysis is true, presumably).

Documented here: https://docs.microsoft.c...#net-framework-projects

Thanks, but this didn't make any difference for me.
ClausAppel3Shape
#4 Posted : Monday, July 6, 2020 12:07:09 PM(UTC)
Rank: Member

Groups: Registered
Joined: 11/21/2019(UTC)
Posts: 10
Location: Denmark

Thanks: 2 times
Was thanked: 2 time(s) in 1 post(s)
ClausAppel3Shape;14642 wrote:
Remco;14639 wrote:
I'm not particularly familiar with the mechanics of these files or their purpose, but is it possible that the global editorconfig file simply needs to be present inside the NCrunch workspace? If so, try adding it to the 'Additional files to include' in your NCrunch solution-level configuration.

Thanks. Where do I set "Additional files to include"? I see no such setting when I go to Extensions -> NCrunch -> Configuration and search.

I figured this out. The setting is not visible nor searchable when "General Settings" is selected. I have to unfold "General Settings" and select either "My Settings" or "Shared Settings". This seems to fix my immediate problem.
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.045 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download