Skip to content

Generated files are missing a standard auto-generated header #535

@sharwell

Description

@sharwell

Several source analysis tools look for an "auto-generated" tag in the header of generated files in order to suppress analysis for these files. One example of such a tool is StyleCop. Here is an example of a suitable header. The specific part of the header which the tools look for is the substring <auto-generated. The remaining part is informational, but frequently included in such headers.

//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     GitVersion
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

📝 I'm planning to submit a pull request soon with a proposed implementation of this. But if someone wants to beat me to it, that's fine too. 😄

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions