lib/linguist/generated.rb in github-linguist-4.8.16 vs lib/linguist/generated.rb in github-linguist-4.8.17

- old
+ new

@@ -54,10 +54,11 @@ xcode_file? || generated_net_designer_file? || generated_net_specflow_feature_file? || composer_lock? || node_modules? || + go_vendor? || npm_shrinkwrap? || godeps? || generated_by_zephir? || minified_files? || has_source_map? || @@ -300,9 +301,17 @@ # Internal: Is the blob part of node_modules/, which are not meant for humans in pull requests. # # Returns true or false. def node_modules? !!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]+(?<!-)\.)+(com|edu|gov|in|me|net|org|fm|io)/) end # Internal: Is the blob a generated npm shrinkwrap file. # # Returns true or false.