mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 09:40:21 +00:00
Add Go dependencies to generated.rb and test_blob.rb
This commit is contained in:
@@ -56,6 +56,7 @@ module Linguist
|
||||
generated_net_specflow_feature_file? ||
|
||||
composer_lock? ||
|
||||
node_modules? ||
|
||||
go_vendor? ||
|
||||
godeps? ||
|
||||
generated_by_zephir? ||
|
||||
minified_files? ||
|
||||
@@ -280,6 +281,14 @@ module Linguist
|
||||
!!name.match(/node_modules\//)
|
||||
end
|
||||
|
||||
# Internal: Is the blob part of the Go vendor/ tree,
|
||||
# not meant for humans in pull requests.
|
||||
#
|
||||
# Returns true or false.
|
||||
def go_vendor?
|
||||
!!name.match(/vendor\//)
|
||||
end
|
||||
|
||||
# Internal: Is the blob part of Godeps/,
|
||||
# which are not meant for humans in pull requests.
|
||||
#
|
||||
|
||||
@@ -245,6 +245,10 @@ class TestBlob < Minitest::Test
|
||||
|
||||
assert sample_blob("node_modules/grunt/lib/grunt.js").generated?
|
||||
|
||||
# Go vendored dependencies
|
||||
assert sample_blob("vendor/vendor.json").generated?
|
||||
assert sample_blob("vendor/github.com/kr/s3/sign.go").generated?
|
||||
|
||||
# Godep saved dependencies
|
||||
assert sample_blob("Godeps/Godeps.json").generated?
|
||||
assert sample_blob("Godeps/_workspace/src/github.com/kr/s3/sign.go").generated?
|
||||
|
||||
Reference in New Issue
Block a user