From 38901d51d2aebf2fa3ea06fd2e487c5b3dd38fb3 Mon Sep 17 00:00:00 2001 From: NachoSoto Date: Wed, 29 Nov 2017 06:25:04 -0800 Subject: [PATCH] Changed Carthage vendor regex to allow folder in any subdirectory (#3921) In monorepro projects, it's not uncommon for `Carthage` to not be in the root directory. --- lib/linguist/vendor.yml | 2 +- test/test_file_blob.rb | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/linguist/vendor.yml b/lib/linguist/vendor.yml index 5bbbdc96..d681199d 100644 --- a/lib/linguist/vendor.yml +++ b/lib/linguist/vendor.yml @@ -240,7 +240,7 @@ - \.imageset/ # Carthage -- ^Carthage/ +- (^|/)Carthage/ # Sparkle - (^|/)Sparkle/ diff --git a/test/test_file_blob.rb b/test/test_file_blob.rb index c290a4b9..bf5a22c8 100644 --- a/test/test_file_blob.rb +++ b/test/test_file_blob.rb @@ -492,6 +492,9 @@ class TestFileBlob < Minitest::Test # Carthage assert sample_blob('Carthage/blah').vendored? + assert sample_blob('iOS/Carthage/blah').vendored? + assert !sample_blob('My-Carthage/blah').vendored? + assert !sample_blob('iOS/My-Carthage/blah').vendored? # Html5shiv assert sample_blob("Scripts/html5shiv.js").vendored?