mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-12-08 20:38:47 +00:00
Merge pull request #2139 from github/stats-improvements
Improve repository language statistics
This commit is contained in:
@@ -7,10 +7,14 @@
|
|||||||
# Please add additional test coverage to
|
# Please add additional test coverage to
|
||||||
# `test/test_blob.rb#test_documentation` if you make any changes.
|
# `test/test_blob.rb#test_documentation` if you make any changes.
|
||||||
|
|
||||||
## Documentation Conventions ##
|
## Documentation directories ##
|
||||||
|
|
||||||
- ^docs?/
|
- ^docs?/
|
||||||
- ^Documentation/
|
- (^|/)[Dd]ocumentation/
|
||||||
|
- (^|/)javadoc/
|
||||||
|
- ^man/
|
||||||
|
|
||||||
|
## Documentation files ##
|
||||||
|
|
||||||
- (^|/)CONTRIBUTING(\.|$)
|
- (^|/)CONTRIBUTING(\.|$)
|
||||||
- (^|/)COPYING(\.|$)
|
- (^|/)COPYING(\.|$)
|
||||||
|
|||||||
@@ -3165,7 +3165,7 @@ XC:
|
|||||||
ace_mode: c_cpp
|
ace_mode: c_cpp
|
||||||
|
|
||||||
XML:
|
XML:
|
||||||
type: markup
|
type: data
|
||||||
ace_mode: xml
|
ace_mode: xml
|
||||||
aliases:
|
aliases:
|
||||||
- rss
|
- rss
|
||||||
|
|||||||
@@ -251,3 +251,6 @@
|
|||||||
# ProGuard
|
# ProGuard
|
||||||
- proguard.pro
|
- proguard.pro
|
||||||
- proguard-rules.pro
|
- proguard-rules.pro
|
||||||
|
|
||||||
|
# Android Google APIs
|
||||||
|
- (^|/)\.google_apis/
|
||||||
|
|||||||
@@ -439,6 +439,9 @@ class TestBlob < Minitest::Test
|
|||||||
assert sample_blob("activator.bat").vendored?
|
assert sample_blob("activator.bat").vendored?
|
||||||
assert sample_blob("subproject/activator").vendored?
|
assert sample_blob("subproject/activator").vendored?
|
||||||
assert sample_blob("subproject/activator.bat").vendored?
|
assert sample_blob("subproject/activator.bat").vendored?
|
||||||
|
|
||||||
|
assert_predicate fixture_blob(".google_apis/bar.jar"), :vendored?
|
||||||
|
assert_predicate fixture_blob("foo/.google_apis/bar.jar"), :vendored?
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_documentation
|
def test_documentation
|
||||||
@@ -448,7 +451,15 @@ class TestBlob < Minitest::Test
|
|||||||
refute_predicate fixture_blob("project/docs/foo.html"), :documentation?
|
refute_predicate fixture_blob("project/docs/foo.html"), :documentation?
|
||||||
|
|
||||||
assert_predicate fixture_blob("Documentation/foo.md"), :documentation?
|
assert_predicate fixture_blob("Documentation/foo.md"), :documentation?
|
||||||
refute_predicate fixture_blob("project/Documentation/foo.md"), :documentation?
|
assert_predicate fixture_blob("documentation/foo.md"), :documentation?
|
||||||
|
assert_predicate fixture_blob("project/Documentation/foo.md"), :documentation?
|
||||||
|
assert_predicate fixture_blob("project/documentation/foo.md"), :documentation?
|
||||||
|
|
||||||
|
assert_predicate fixture_blob("javadoc/foo.html"), :documentation?
|
||||||
|
assert_predicate fixture_blob("project/javadoc/foo.html"), :documentation?
|
||||||
|
|
||||||
|
assert_predicate fixture_blob("man/foo.html"), :documentation?
|
||||||
|
refute_predicate fixture_blob("project/man/foo.html"), :documentation?
|
||||||
|
|
||||||
assert_predicate fixture_blob("README"), :documentation?
|
assert_predicate fixture_blob("README"), :documentation?
|
||||||
assert_predicate fixture_blob("README.md"), :documentation?
|
assert_predicate fixture_blob("README.md"), :documentation?
|
||||||
|
|||||||
Reference in New Issue
Block a user