-
Notifications
You must be signed in to change notification settings - Fork 226
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
Add .gitattributes for GitHub Linguist #154
Conversation
@@ -0,0 +1,11 @@ | |||
docs/* linguist-documentation |
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.
Coming in #111
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 accidentally deleted this part of my review 10 hours ago, but I've tried to reconstruct it here:
We don't strictly need an override for the docs/
or example/
directories as they seem to be covered by documentation.yml already, but I agree to keep them anyway to state the fact explicitly. I tested by renaming tutorial/
to docs/
:
.gitattributes
Outdated
examples/* -linguist-detectable | ||
tutorial/* -linguist-detectable |
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.
Does it make sene to move examples/
and tutorial/
into the docs/
directory?
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.
A tutorial and examples are definitely important parts of the documentation, but moving them into the docs/
directory or not is perhaps a matter of taste. Some might argue that it might be less easy to discover them if moving them, and others might argue that they always start with the docs/
anyway and don't see a problem. If moving them, please include links to them both from the root README.md
and from the docs/README.md
.
We don't strictly need an override for the tutorial/
directory either, probably because the of the **/*.html linguist-generated
further down in this file, but I agree to keep them anyway to state the fact explicitly. However, I suggest using linguist-documentation
in both of them. I tested without any directory overrides:
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 an attempt to use GitHub Linguist to
- avoid the
examples/
andtutorial/
directories to be included in the project's language statistics- mark any WireViz output files (TSV, CSV, GV, HTML, SVG, PNG) as generated files
Unfortunately, it seems that the statistics are only updated when merged into
master
, so maybe someone with more experience can confirm that my implemenation will actually have the intended effect.
I didn't have any experience with the language statistics either, so I did some tests in my forked repo:
- First, I had to force-push your master into my fork master to have the same starting point as you. (I originally forked from aakatz3 which had a master not in sync with your master.)
- Then I cherry-picked your single commit in this PR into my master and pushed that to my fork:
git cherry-pick aedd53393ca2052f2b8dc5f87d54b2a0ef510a94
git push kvid
Before the cherry-pick, the language statistics looked identical to yours:
After pushing the cherry-picked commit, the language statistics changed:
If this was the result you aimed for, then I conclude that you should consider including this PR in v0.2. I only have the very minor change suggestion about replacing -linguist-detectable
with linguist-documentation
to state that it is documentation, but it's not very important to me because the effect is the same.
.gitattributes
Outdated
examples/* -linguist-detectable | ||
tutorial/* -linguist-detectable |
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.
A tutorial and examples are definitely important parts of the documentation, but moving them into the docs/
directory or not is perhaps a matter of taste. Some might argue that it might be less easy to discover them if moving them, and others might argue that they always start with the docs/
anyway and don't see a problem. If moving them, please include links to them both from the root README.md
and from the docs/README.md
.
We don't strictly need an override for the tutorial/
directory either, probably because the of the **/*.html linguist-generated
further down in this file, but I agree to keep them anyway to state the fact explicitly. However, I suggest using linguist-documentation
in both of them. I tested without any directory overrides:
Thank you very much for running this test. I've changed |
This is an attempt to use GitHub Linguist to
examples/
andtutorial/
directories to be included in the project's language statisticsUnfortunately, it seems that the statistics are only updated when merged into
master
, so maybe someone with more experience can confirm that my implemenation will actually have the intended effect.