mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 09:40:21 +00:00
2945 local (#2992)
* Added Django environment folder in exclusion Django projects have env/ folder in which dependencies of the project like Django, Pillow, and other libraries are installed from the requirements.txt file. It would be best if this folder of dependencies is ignored from the language statistics. * Corrected Errors Corrected the misplaced code and put removed the start character as the environment folder may not always be in the root. * Adding test for env folder
This commit is contained in:
@@ -190,6 +190,7 @@
|
||||
|
||||
# django
|
||||
- (^|/)admin_media/
|
||||
- (^|/)env/
|
||||
|
||||
# Fabric
|
||||
- ^fabfile\.py$
|
||||
|
||||
@@ -19,7 +19,7 @@ class TestFileBlob < Minitest::Test
|
||||
blob.instance_variable_set(:@name, 'script')
|
||||
blob
|
||||
end
|
||||
|
||||
|
||||
def test_extensions
|
||||
assert_equal [".gitignore"], Linguist::FileBlob.new(".gitignore").extensions
|
||||
assert_equal [".xml"], Linguist::FileBlob.new("build.xml").extensions
|
||||
@@ -312,11 +312,13 @@ class TestFileBlob < Minitest::Test
|
||||
# Debian packaging
|
||||
assert sample_blob("debian/cron.d").vendored?
|
||||
|
||||
# Django env
|
||||
assert sample_blob("env/foo.py").vendored?
|
||||
|
||||
# Erlang
|
||||
assert sample_blob("rebar").vendored?
|
||||
|
||||
# git config files
|
||||
|
||||
assert_predicate fixture_blob("some/path/.gitattributes"), :vendored?
|
||||
assert_predicate fixture_blob(".gitignore"), :vendored?
|
||||
assert_predicate fixture_blob("special/path/.gitmodules"), :vendored?
|
||||
|
||||
@@ -36,7 +36,7 @@ class TestGenerated < Minitest::Test
|
||||
generated_loading_data(File.join(samples_path, name))
|
||||
end
|
||||
|
||||
def test_check_generated
|
||||
def test_check_generated
|
||||
# Xcode project files
|
||||
generated_sample_without_loading_data("Binary/MainMenu.nib")
|
||||
generated_sample_without_loading_data("Dummy/foo.xcworkspacedata")
|
||||
|
||||
Reference in New Issue
Block a user