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

Stop test.html from skewing language classification #667

Merged
merged 1 commit into from Apr 11, 2017
Merged

Stop test.html from skewing language classification #667

merged 1 commit into from Apr 11, 2017

Conversation

Alhadis
Copy link
Contributor

@Alhadis Alhadis commented Apr 6, 2017

I really should've paid more attention before submitting #660...

This PR finishes off what #660 should've done by excluding test.html from the repository's language breakdown. It's common practice in many GitHub repos to mark test files with the linguist-documentation attribute.

This is identical to linguist-vendored in that it stops marked files from skewing language stats... the key difference being that "documentation" files are included in diffs on GitHub, whereas vendored files aren't. Test-related files are the sort of thing that you don't want bloating language stats, but don't want hidden in diffs, either.

I know this isn't a huge issue, but if I'm gonna contribute a menial fix, I may as well do it right.

Here's the output of running linguist in the updated repository:

λ Normalize.css: linguist --breakdown .
100.00% CSS

CSS:
normalize.css

λ Normalize.css (linguist-fix-part-II)

Whereas before, it was this:

λ Normalize.css: linguist --breakdown .
65.83%  HTML
34.17%  CSS

CSS:
normalize.css

HTML:
test.html

@Alhadis
Copy link
Contributor Author

Alhadis commented Apr 6, 2017

Holy crap, I can't believe I wrote all that out for something that's a stone's throw away from OCD.

@jonathantneal jonathantneal merged commit 1b16be0 into necolas:master Apr 11, 2017
@jonathantneal
Copy link
Contributor

@Alhadis, OCD is very welcome here. Thanks, @Alhadis!

@Alhadis Alhadis deleted the linguist-fix-part-II branch Apr 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants