belav / csharpier

CSharpier is an opinionated code formatter for c#.
https://csharpier.com
MIT License
1.43k stars 99 forks source link

Add option to allow formatting auto generated files. #1055

Closed belav closed 10 months ago

belav commented 1 year ago

There are cases where code is auto generated outside of c# and a user will want to run csharpier to format them.

Adding a CLI option --include-generated to bypass the check for if a file is auto-generated will allow them to format those files.

Some notes

  1. Are there generated files in the obj folder that would get accidentally included by adding this option?
  2. If a user asks csharpier to format a single file, should that assume they want to format the file even if it is generated?