Ignore line changes in generated files #12343
Unanswered
magnattic
asked this question in
Pull Requests
Replies: 2 comments
-
|
Very painful for go |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Yes, it would be cool if it ignored the lines count stats. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Motivation
Right now, the line changes in a PR consider all files, including autogenerated ones. That makes it hard to find out how many relevant lines where changed, which would be useful to see how big the PR actually is.
One major use case for this is automatically labeling PRs by size, for example with https://github.com/CodelyTV/pr-size-labeler. This becomes much harder if the API also includes line changes from files that are already marked as autogenerated.
Context
There is already the possibility to mark files as autogenerated through the
.gitattributesfile.From the github linguist docs (emphasis mine):
Reading this I would expect those autogenerated files to also
What actually happens
This PR shows 1,462 line changes, even though only 28 meaningful lines have changed. The rest is autogenerated.
What I would expect
Give us a way to see the meaningful line changes, both in the API and in the UI, by
linguist-generatedall-together in the PR and APIBeta Was this translation helpful? Give feedback.
All reactions