-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Mark files under htmlcov/
as generated
#6491
Conversation
I appear to be making some sort of (likely silly) mistake. # Doing this in Ruby returns `true`, too
Linguist::Generated.generated?('htmlcov/index.html', lambda { nil }) |
Oh, of course. It helps to actually read the failure message 😅 Moved the check up the chain of Anyway, opening it back up for review. I'm anticipating that maybe some method renaming and/or combining with other methods may be requested 🙂 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nitpick concerning naming; don't forget to move the method definition to its alphabetically-appropriate location in Scratch that, the file's not ordered anyway. 😅generated.rb
lib/linguist/generated.rb
Outdated
@@ -72,6 +72,7 @@ def generated? | |||
generated_yarn_plugnplay? || | |||
godeps? || | |||
generated_by_zephir? || | |||
coveragepy_htmlcov_file? || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: it makes more sense to name this htmlcov?
, as the method doesn't involve anything more specific than pathname examination.
(If we checked for a substring like <!-- Generated by coverage.py v1.23 -->
or what-have-you, then it might make more sense to tie this method to a specific utility).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, thanks!
Co-authored-by: John Gardner <gardnerjohng@gmail.com>
Description
This marks files generated by coverage.py, specifically the
coverage html
command, as generated. There are currently quite a lot of these files that are returned by GitHub's search, and it seems like the large majority come from this tool (more specific search results).Checklist: