-
Notifications
You must be signed in to change notification settings - Fork 293
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
Code Quality: Hide unnecessary languages from GitHub Linguist #1892
base: main
Are you sure you want to change the base?
Conversation
Whack!
Whack! Double points!
THWACK!!! CRITICAL HIT!! High score: 5 languages hit
Bonus round! 4 points for a total of 9 points! Well done, play again!
@slozier high score! Looks like the game gave me a bonus round as well. |
I guess this is the sort of list I was trying to avoid. 😀 How many of these are caused by the stdlib lib folder? Wondering if marking that folder as linguist-vendored would be a better approach. |
Only batchfile is used in the stdlib, though it is also used in the tests.. |
*.1 linguist-detectable=false | ||
*.2 linguist-detectable=false | ||
*.3 linguist-detectable=false | ||
*.4 linguist-detectable=false |
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.
This is just the stupid design of Linguist - it detects all files with a numbered extension as being Roff.
When IronPython is bumped to later versions of Python it will need to be changed
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.
Right, but 1
, 2
and 3
are coming from the standard library so excluding it would eliminate those (as well as the pck
that we filtered before). I can live with having ps1
, cmd
, bat
and c
being picked up by Linguist as we actually some of those in the codebase. That only leaves 4
which would need to be filtered out. So how about something simple like:
src/core/IronPython.StdLib/lib/** linguist-vendored
eng/package/deb/* -linguist-detectable
*.html linguist-documentation
This would probably also end up giving better stats about the code we "own" (yes we do tweak the standard lib, but the changes are very limited).
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.
/eng/package/deb also causes issues with this.
I think the recommendation I made in the comment below is the best solution.
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.
I excluded eng/package/deb in my code snippet...
@slozier another approach to this would to just do: * linguist-detectable=false
*.cs linguist-detectable
*.py linguist-detectable |
High score: 9 languages!
5 from main rounds, 4 from bonus round!