From 51d3711faf3e416bcbeac9404a557f753d263746 Mon Sep 17 00:00:00 2001 From: Cyrille Le Clerc Date: Sun, 8 Apr 2018 17:04:34 +0200 Subject: [PATCH] Detect Maven wrapper "mvnw" (#4042) * Detect Maven wrapper "mvnw" * Fix build, filenames must be sorted in the "filenames" section of languages.yml, filenames cannot be grouped by topic * Remove `mvnw` file from languages/Shell/filenames according to @Alhadis recommendation as we are sure that `mvnw` always starts with the shebang `#!/bin/sh`. * Remove space chars added by mistake --- lib/linguist/vendor.yml | 7 +++++++ test/test_file_blob.rb | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/lib/linguist/vendor.yml b/lib/linguist/vendor.yml index c8a0b647..6a892845 100644 --- a/lib/linguist/vendor.yml +++ b/lib/linguist/vendor.yml @@ -276,6 +276,13 @@ - (^|/)gradlew\.bat$ - (^|/)gradle/wrapper/ +## Java ## + +# Maven +- (^|/)mvnw$ +- (^|/)mvnw\.cmd$ +- (^|/)\.mvn/wrapper/ + ## .NET ## # Visual Studio IntelliSense diff --git a/test/test_file_blob.rb b/test/test_file_blob.rb index a9bb672b..c10c3372 100644 --- a/test/test_file_blob.rb +++ b/test/test_file_blob.rb @@ -534,6 +534,14 @@ class TestFileBlob < Minitest::Test assert sample_blob("subproject/gradlew.bat").vendored? assert sample_blob("subproject/gradle/wrapper/gradle-wrapper.properties").vendored? + # Maven + assert sample_blob("mvnw").vendored? + assert sample_blob("mvnw.cmd").vendored? + assert sample_blob(".mvn/wrapper/maven-wrapper.properties").vendored? + assert sample_blob("subproject/mvnw").vendored? + assert sample_blob("subproject/mvnw.cmd").vendored? + assert sample_blob("subproject/.mvn/wrapper/maven-wrapper.properties").vendored? + # Octicons assert sample_blob("octicons.css").vendored? assert sample_blob("public/octicons.min.css").vendored?