Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore generated data (by default) #273

Open
sanmai-NL opened this issue Jun 19, 2023 · 1 comment
Open

Ignore generated data (by default) #273

sanmai-NL opened this issue Jun 19, 2023 · 1 comment

Comments

@sanmai-NL
Copy link

See https://learn.microsoft.com/en-us/visualstudio/code-quality/use-roslyn-analyzers?view=vs-2019#configure-generated-code for the generated data convention with EditorConfig.

While generated data doesn't necessarily fall out of scope of an EditorConfig check, I believe generated source code should have all properties unset by default, since often its format can't be controlled at generation time and an exact hash value of the generated data is matched against by some systems (e.g., PDM lock files). Alternatively, a single configuration option without a default, to reset all properties for generated data would be valuable too.

Example

[*.lock]
generated_code = true

Should evaluate to at least:

[*.lock]
generated_code = true
max_line_length = unset
@mstruebing
Copy link
Member

Hey @sanmai-NL , can you check if that behaviour is supported by https://github.com/editorconfig/editorconfig-core-go as this is what powers the editoronfig definition of this tool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants