简体   繁体   中英

Style Cop Auto Generated code

We are using style cop in VS2013 c# solution. I am running in to a specific scenario where the auto generated code files don't have the // tag as the header. These are the files I have in the integration test project for Workflow designer files, with code - behind auto generated files, they are re-created during the build process every single time. So adding the header doesn't help.

Is there a permanent solution to this problem?

Thanks!

Try adding this to your Settings.StyleCop file:

<Parsers>
  <Parser ParserId="StyleCop.CSharp.CsParser">
    <ParserSettings>
      <CollectionProperty Name="GeneratedFileFilters">
        <Value>\\TemporaryGeneratedFile_.+\.cs$</Value>
      </CollectionProperty>
    </ParserSettings>
  </Parser>
</Parsers> 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM