diff --git a/lib/linguist/generated.rb b/lib/linguist/generated.rb index 339cca4e..a9ca4914 100644 --- a/lib/linguist/generated.rb +++ b/lib/linguist/generated.rb @@ -56,6 +56,7 @@ module Linguist generated_net_specflow_feature_file? || composer_lock? || node_modules? || + go_vendor? || npm_shrinkwrap? || godeps? || generated_by_zephir? || @@ -304,6 +305,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\/((?!-)[-0-9A-Za-z]+(?