pull-request-size icon indicating copy to clipboard operation
pull-request-size copied to clipboard

Generated code still being counted

Open ivanvanderbyl opened this issue 2 years ago • 2 comments

We use a lot of Go code generation, and the code gen headers match your regex in isGoCodgen, but the change still get counted. Any ideas?

ivanvanderbyl avatar Nov 15 '23 02:11 ivanvanderbyl

@ivanvanderbyl please forgive me for not seeing this sooner...

if you use linguist-generated instead of linguist-generated=true it should now be supported after I merge this PR https://github.com/noqcks/pull-request-size/pull/169

if you dont use linguist-generated without true, let me know, as there is a bigger issue.

noqcks avatar Nov 23 '24 22:11 noqcks

it's still not correct, I have *.snap linguist-generated=true in my gitattributes and it still count changes in routes/__snapshots__/index.test.ts.snap

https://github.com/trim21/bangumi-server-private/pull/7

it's +2 lines in non-generated code and +114 lines in generated code, result into a size/M label

and my config:

XS:
  name: size/XS
  lines: 0
S:
  name: size/S
  lines: 30
M:
  name: size/M
  lines: 100

trim21 avatar Jan 04 '25 14:01 trim21