mirror of
				https://github.com/KevinMidboe/linguist.git
				synced 2025-10-29 17:50:22 +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? || |       generated_net_specflow_feature_file? || | ||||||
|       composer_lock? || |       composer_lock? || | ||||||
|       node_modules? || |       node_modules? || | ||||||
|  |       go_vendor? || | ||||||
|       godeps? || |       godeps? || | ||||||
|       generated_by_zephir? || |       generated_by_zephir? || | ||||||
|       minified_files? || |       minified_files? || | ||||||
| @@ -280,6 +281,14 @@ module Linguist | |||||||
|       !!name.match(/node_modules\//) |       !!name.match(/node_modules\//) | ||||||
|     end |     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/, |     # Internal: Is the blob part of Godeps/, | ||||||
|     # which are not meant for humans in pull requests. |     # 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? |     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 |     # Godep saved dependencies | ||||||
|     assert sample_blob("Godeps/Godeps.json").generated? |     assert sample_blob("Godeps/Godeps.json").generated? | ||||||
|     assert sample_blob("Godeps/_workspace/src/github.com/kr/s3/sign.go").generated? |     assert sample_blob("Godeps/_workspace/src/github.com/kr/s3/sign.go").generated? | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user