开发者

StyleCop SA1636 rule firing when it should not

We are using Resharper 4.5 and StyleCop 4.3.

We have a project with many .CS files in it. All .CS files have valid headers, as defined by our StyleCop settings, and added automatically by Resharper's Insert/repla开发者_JS百科ce header action.

Four of the .CS files receive a SA1636 warning. The copyright text exactly matches the declared copyright text from the settings file.

Has anyone else experienced this problem? Is there any kind of diagnostic logging that we can enable or otherwise use to help determine why this one rule appears to be mis-firing?


Check the encoding format using something like notepad or visual studio Save As - mine was encoding with the wrong character set.


In case @Adrian's answer didn't work for you, this one will:

  1. Right click over StyleCop.json
  2. Click on Properties
  3. Change the build action to 'C# analyser additional file':

StyleCop SA1636 rule firing when it should not

Credits to Peter Morlion: https://blog.submain.com/stylecop-detailed-guide/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜