From 93cd47822f95dc969d574d853e2662a95b3576d5 Mon Sep 17 00:00:00 2001 From: Ashe Connor Date: Tue, 17 Oct 2017 19:05:20 +1100 Subject: [PATCH] Only recognise Pod for .pod files (#3863) We uncomplicate matters by removing ".pod" from the Perl definition entirely. --- lib/linguist/heuristics.rb | 8 -------- lib/linguist/languages.yml | 1 - samples/{Pod => Perl}/feedgnuplot | 0 samples/{Perl => Pod}/Sample.pod | 0 test/test_heuristics.rb | 10 +--------- 5 files changed, 1 insertion(+), 18 deletions(-) rename samples/{Pod => Perl}/feedgnuplot (100%) rename samples/{Perl => Pod}/Sample.pod (100%) diff --git a/lib/linguist/heuristics.rb b/lib/linguist/heuristics.rb index 30c5939c..f688312a 100644 --- a/lib/linguist/heuristics.rb +++ b/lib/linguist/heuristics.rb @@ -367,14 +367,6 @@ module Linguist end end - disambiguate ".pod", "Pod", "Perl" do |data| - if /^=\w+\b/.match(data) - Language["Pod"] - else - Language["Perl"] - end - end - disambiguate ".pro" do |data| if /^[^#]+:-/.match(data) Language["Prolog"] diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 3945e1df..0634dcd2 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -3313,7 +3313,6 @@ Perl: - ".ph" - ".plx" - ".pm" - - ".pod" - ".psgi" - ".t" filenames: diff --git a/samples/Pod/feedgnuplot b/samples/Perl/feedgnuplot similarity index 100% rename from samples/Pod/feedgnuplot rename to samples/Perl/feedgnuplot diff --git a/samples/Perl/Sample.pod b/samples/Pod/Sample.pod similarity index 100% rename from samples/Perl/Sample.pod rename to samples/Pod/Sample.pod diff --git a/test/test_heuristics.rb b/test/test_heuristics.rb index 6ea3a958..5bcb5f08 100644 --- a/test/test_heuristics.rb +++ b/test/test_heuristics.rb @@ -1,6 +1,6 @@ require_relative "./helper" -class TestHeuristcs < Minitest::Test +class TestHeuristics < Minitest::Test include Linguist def fixture(name) @@ -237,14 +237,6 @@ class TestHeuristcs < Minitest::Test }) end - # Candidate languages = ["Pod", "Perl"] - def test_pod_by_heuristics - assert_heuristics({ - "Perl" => all_fixtures("Perl", "*.pod"), - "Pod" => all_fixtures("Pod", "*.pod") - }) - end - # Candidate languages = ["IDL", "Prolog", "QMake", "INI"] def test_pro_by_heuristics assert_heuristics({