.net - How to configure StyleCop to suppress warnings on generated code? -


Another project, this is an option in Code Analysis of Visual Studio, but I do not have it for Style Cop (aka Source Analysis) Could search

The file I want to ignore is a DBML .designer.cs code, which contains // and lt; Autogenerated & gt; The tag tells me that it will be enough, but in my case it is not.

edit: I use header in grammar generated for ARLL I am This is actually the main part of the string template template, so two \ & gt; entries are actually just & gt; escapes the scores & lt; Auto-generated & gt; In addition to the tag and [GeneratedCode] attribute, we had to disable some alerts that were shown during code analysis.

  // -------------------------------------- ------ ------------------------------ // \ & lt; Auto Generated & gt; // This code was generated by a tool // ATLL version: ANLRVRSson // // Changes made in this file can be the reason of wrong behavior and if // is reproduced then it will be lost. // \ & lt; / Auto-generated & gt; // ------------------------------------------------ ------------------------------ // $ ANTLR & lt; ANNTLRarson & gt; & Lt; FileName & gt; // Variable has been assigned to 'variable' but its value is never used. #pragma Alert Disabled 219 // Unrecoverable Code Detected #pragma Alert Disabled 162 // XML comment is missing for type or member of public view 'Type_or_Member' #pragma Disable alert 1591 // CLS compliance check ' Type 'because it is not visible from outside this assembly. #pragma Alert disable 3019 // 'type' does not require CLSCompliant attribute because the assembly does not have CLSCompliant attribute. #pragma Warning disabled 3021 [System.CodeDom.Compiler.GeneratedCode ("ANTLR", "")] [System.CLSCompliant (wrong)] public class ...  

Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -