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

Exclude generated files from language statistics #11653

Merged
merged 3 commits into from
May 29, 2020

Conversation

lafriks
Copy link
Member

@lafriks lafriks commented May 28, 2020

Fix to exclude generated files from language statistics

@lafriks lafriks added the type/enhancement An improvement of existing functionality label May 28, 2020
@lafriks lafriks added this to the 1.13.0 milestone May 28, 2020
@lafriks
Copy link
Member Author

lafriks commented May 28, 2020

It would be nice if we could also backport this to 1.12 so that there is no need to regenerate all language stats later on, what do you think?

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 28, 2020
@zeripath zeripath added backport/done All backports for this PR have been created backport/v1.12 and removed backport/done All backports for this PR have been created labels May 28, 2020
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels May 28, 2020
@zeripath
Copy link
Contributor

zeripath commented May 28, 2020

I think backporting to 1.12 is a good idea. It'll save the repeated issues opening about stopping generated files from being included (vis a viz #10335, #11580, #10567 ) and we'll save having to regenerate later.

(I wonder if there is a relatively cheap way of using isGenerated on our diff pages.)

@lafriks
Copy link
Member Author

lafriks commented May 28, 2020

It could through it will need reading at least part of the file to detect it

@lafriks lafriks added the status/blocked This PR cannot be merged yet, i.e. because it depends on another unmerged PR label May 28, 2020
@lafriks
Copy link
Member Author

lafriks commented May 28, 2020

Wait until go-enry/go-enry#24 is fixed upstream

@silverwind
Copy link
Member

I wonder if there is a relatively cheap way of using isGenerated on our diff pages.

Seconding this, auto-collapsing generated files in diffs would indeed be a nice feature.

@lafriks
Copy link
Member Author

lafriks commented May 28, 2020

I think it would need to be cached

Copy link
Member

@guillep2k guillep2k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should also consider #10335, regardless of this improvement.

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels May 28, 2020
@guillep2k
Copy link
Member

Wait until go-enry/go-enry#24 is fixed upstream

Merged. For some reason 2.5.0 and 2.5.1 point to the same commit, so I don't know if that was intentional. @mcuadros

@mcuadros
Copy link

mcuadros commented May 29, 2020

Now it's fixed. I also release 2.5.2 with all the fixes, the version has being tested already against 2M of repositories more or less.

@lafriks lafriks removed the status/blocked This PR cannot be merged yet, i.e. because it depends on another unmerged PR label May 29, 2020
@lafriks
Copy link
Member Author

lafriks commented May 29, 2020

Updated go-enry to v2.5.2

@lafriks lafriks merged commit bd23356 into go-gitea:master May 29, 2020
@lafriks lafriks deleted the fix/lang_stats_generated branch May 29, 2020 06:20
lafriks added a commit to lafriks-fork/gitea that referenced this pull request May 29, 2020
@lafriks lafriks added the backport/done All backports for this PR have been created label May 29, 2020
zeripath pushed a commit that referenced this pull request May 29, 2020
ydelafollye pushed a commit to ydelafollye/gitea that referenced this pull request Jul 31, 2020
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants