-
Notifications
You must be signed in to change notification settings - Fork 9
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
support overrides from .gitattributes #5
base: master
Are you sure you want to change the base?
support overrides from .gitattributes #5
Conversation
linguist supports a number of different custom overrides strategies for language definitions and vendored paths.
Neat! I didn't know github/linguist had this feature. It would be nice to achieve feature parity with it where possible. Thank you for this. :D Unfortunately, I can't seem to test out this new behavior... I merged the changes and made a .gitattributes file in a test repo but I can't seem to get it to do anything different... :S Would you mind providing a sample testcase (like a sample .gitattributes demoing each keyword linguist-vendored, -documentation, -language along with a sample directory listing) that I can use to verify that this works and what the intended behavior should be? :) Cheers, |
Less-than-robust, straightforward implementation of https://github.com/github/linguist#overrides See also: #5
I stared at the README for a while longer and wrote my own implementation: https://github.com/generaltso/linguist/compare/feature/gitattributes I won't merge it, even though it works after a simple test:
test_dox.php:
test.go:
testing language override
result:
testing ignore specific paths .gitattributes:
result:
Need to normalize path separators on Windows but again, not merging this. I just was bored and wanted to wrap my head around the problem. |
Yeah I can write unit tests for this. I have unit tests covering this functionality at https://github.com/Azure/draft. I can port those tests over here. |
@bacongobbler what's the status with this? 🤔 |
Sorry! Been busy with other work over the last month. I’ve been maintaining a fork over at Azure/draft#344. There are a few issues with this effort so I’ve been meaning to write some more thorough tests. Once that’s done I’ll port the changes back here. :) Thanks for the ping! |
Okay, I've written a pretty good suite of tests and it's all working. I'll port changes back over here over the holidays and should have this PR ready by the end of the year. Please ping me in 2018 if I don't hold up my end of the bargain :) |
linguist supports a number of different custom overrides strategies for language definitions and vendored paths. This ports that effort over to this Go port of linguist.
See https://github.com/github/linguist#overrides