Skip to content
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,16 @@ tests/suite/file_without_BOM.txt -text
# Do not normalize on commit.
*.pdf -text

# Hide certain languages from GitHub Linguist
*.pck linguist-detectable=false
*.c linguist-detectable=false

*.bat linguist-detectable=false
*.cmd linguist-detectable=false
*.ps1 linguist-detectable=false
*.1 linguist-detectable=false
*.2 linguist-detectable=false
*.3 linguist-detectable=false
*.4 linguist-detectable=false
Copy link
Contributor Author

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

Copy link
Contributor

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).

Copy link
Contributor Author

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.

Copy link
Contributor

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...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops, sorry I didn't see that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why not just this? I think it's the best solution

* linguist-detectable=false
*.cs linguist-detectable
*.py linguist-detectable

Copy link
Contributor

Choose a reason for hiding this comment

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

The advantage of src/core/IronPython.StdLib/lib/** linguist-vendored is that it gets excluded from out stats (which are disproportionately skewed towards Python right now).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Then just:

* linguist-detectable=false
*.cs linguist-detectable
*.py linguist-detectable
src/core/IronPython.StdLib/lib/** linguist-vendored


*.html linguist-documentation=true