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 files by default #140

Closed
belav opened this issue Apr 24, 2021 · 3 comments · Fixed by #162
Closed

Ignore generated files by default #140

belav opened this issue Apr 24, 2021 · 3 comments · Fixed by #162
Labels
type:enhancement New feature or request
Milestone

Comments

@belav
Copy link
Owner

belav commented Apr 24, 2021

Should Csharpier by default ignore files that are named *.generated.cs? Is that a common naming convention?

What about files that include the auto-generated tag? That includes .cshtml.cs files and possibly others.
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------

@belav belav added the type:enhancement New feature or request label Apr 24, 2021
@jrobertson-insite
Copy link

Yes, but I don't think there is any guarantee of what is or is not generated. There are countless ways to generate code (Visual Studio, T4, unit tests, etc). This could be a good use of a config option or file to denote glob patterns that indicate files to ignore. Maybe use the ubiquitous ".gitignore" glob style, ".csharpierignore".

@belav
Copy link
Owner Author

belav commented Apr 25, 2021

.csharpierignore has been proposed and is mentioned in #43
It still may be nice to ignore things by default. Some projects create generated files behind the scenes. Forcing everyone to add those types of files to an ignore list seems like a headache if we can just default it.

@shocklateboy92
Copy link
Collaborator

shocklateboy92 commented Apr 25, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants