From 4c037c644f26bb22152edb09b72b9cd145e6e47c Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Sun, 8 Feb 2015 10:43:45 +0100 Subject: [PATCH 1/8] Grammar for GAP from TextMate bundle --- .gitmodules | 3 +++ grammars.yml | 2 ++ lib/linguist/languages.yml | 2 +- vendor/grammars/gap-tmbundle | 1 + 4 files changed, 7 insertions(+), 1 deletion(-) create mode 160000 vendor/grammars/gap-tmbundle diff --git a/.gitmodules b/.gitmodules index bb4871bd..a4462410 100644 --- a/.gitmodules +++ b/.gitmodules @@ -597,3 +597,6 @@ [submodule "vendor/grammars/InnoSetup"] path = vendor/grammars/InnoSetup url = https://github.com/idleberg/InnoSetup-Sublime-Text +[submodule "vendor/grammars/gap-tmbundle"] + path = vendor/grammars/gap-tmbundle + url = https://github.com/dhowden/gap-tmbundle diff --git a/grammars.yml b/grammars.yml index d7dd24de..fc6a808e 100644 --- a/grammars.yml +++ b/grammars.yml @@ -225,6 +225,8 @@ vendor/grammars/fortran.tmbundle: - source.fortran.modern vendor/grammars/fsharpbinding: - source.fsharp +vendor/grammars/gap-tmbundle/: +- source.gap vendor/grammars/gettext.tmbundle: - source.po vendor/grammars/gnuplot-tmbundle: diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 28fdae5a..c8938202 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -961,7 +961,7 @@ GAP: - .gd - .gi - .tst - tm_scope: none + tm_scope: source.gap ace_mode: text GAS: diff --git a/vendor/grammars/gap-tmbundle b/vendor/grammars/gap-tmbundle new file mode 160000 index 00000000..291a0469 --- /dev/null +++ b/vendor/grammars/gap-tmbundle @@ -0,0 +1 @@ +Subproject commit 291a0469dd4eb7082b08e828edc8bf0cfbb9b599 From d17f5dfd9e82e189dc56477eef24e63102eae31a Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Sun, 8 Feb 2015 11:14:18 +0100 Subject: [PATCH 2/8] Papyrus grammar from Sublime Text package --- .gitmodules | 3 +++ grammars.yml | 4 ++++ lib/linguist/languages.yml | 2 +- vendor/grammars/SublimePapyrus | 1 + 4 files changed, 9 insertions(+), 1 deletion(-) create mode 160000 vendor/grammars/SublimePapyrus diff --git a/.gitmodules b/.gitmodules index a4462410..01ef7c5f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -600,3 +600,6 @@ [submodule "vendor/grammars/gap-tmbundle"] path = vendor/grammars/gap-tmbundle url = https://github.com/dhowden/gap-tmbundle +[submodule "vendor/grammars/SublimePapyrus"] + path = vendor/grammars/SublimePapyrus + url = https://github.com/Kapiainen/SublimePapyrus diff --git a/grammars.yml b/grammars.yml index fc6a808e..66ae4138 100644 --- a/grammars.yml +++ b/grammars.yml @@ -112,6 +112,10 @@ vendor/grammars/Sublime-VimL: - source.viml vendor/grammars/SublimeBrainfuck: - source.bf +vendor/grammars/SublimePapyrus/: +- source.compiled-papyrus +- source.papyrus +- source.papyrus-assembly vendor/grammars/SublimeXtend: - source.xtend vendor/grammars/TXL/: diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index c8938202..ac54b94a 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -2158,7 +2158,7 @@ Papyrus: color: "#6600cc" extensions: - .psc - tm_scope: none + tm_scope: source.papyrus ace_mode: text Parrot: diff --git a/vendor/grammars/SublimePapyrus b/vendor/grammars/SublimePapyrus new file mode 160000 index 00000000..5a7b3e7b --- /dev/null +++ b/vendor/grammars/SublimePapyrus @@ -0,0 +1 @@ +Subproject commit 5a7b3e7b29fdee835d0198d1f20e21c0ff874154 From cc5881dca22f914a186be3d23a7eecaae55f4a7e Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Sun, 8 Feb 2015 11:20:40 +0100 Subject: [PATCH 3/8] Grammar for Propeller Spin from Sublime Text package --- .gitmodules | 3 +++ grammars.yml | 3 +++ lib/linguist/languages.yml | 2 +- vendor/grammars/sublime-spintools | 1 + 4 files changed, 8 insertions(+), 1 deletion(-) create mode 160000 vendor/grammars/sublime-spintools diff --git a/.gitmodules b/.gitmodules index 01ef7c5f..e7bcdac5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -603,3 +603,6 @@ [submodule "vendor/grammars/SublimePapyrus"] path = vendor/grammars/SublimePapyrus url = https://github.com/Kapiainen/SublimePapyrus +[submodule "vendor/grammars/sublime-spintools"] + path = vendor/grammars/sublime-spintools + url = https://github.com/bitbased/sublime-spintools diff --git a/grammars.yml b/grammars.yml index 66ae4138..ded5e7cb 100644 --- a/grammars.yml +++ b/grammars.yml @@ -465,6 +465,9 @@ vendor/grammars/sublime-rust: - source.rust vendor/grammars/sublime-sourcepawn: - source.sp +vendor/grammars/sublime-spintools/: +- source.regexp.spin +- source.spin vendor/grammars/sublime-tea: - source.tea vendor/grammars/sublime-text-ox/: diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index ac54b94a..b02b4148 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -2323,7 +2323,7 @@ Propeller Spin: color: "#2b446d" extensions: - .spin - tm_scope: none + tm_scope: source.spin ace_mode: text Protocol Buffer: diff --git a/vendor/grammars/sublime-spintools b/vendor/grammars/sublime-spintools new file mode 160000 index 00000000..56d326a4 --- /dev/null +++ b/vendor/grammars/sublime-spintools @@ -0,0 +1 @@ +Subproject commit 56d326a44ec0be0f301d5fb1d9e1ada9944554bb From 30d2883436cba5733031536200b148ae6361833a Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Sun, 8 Feb 2015 11:44:11 +0100 Subject: [PATCH 4/8] Grammar for PogoScript from TextMate bundle --- .gitmodules | 3 +++ grammars.yml | 2 ++ lib/linguist/languages.yml | 2 +- vendor/grammars/PogoScript.tmbundle | 1 + 4 files changed, 7 insertions(+), 1 deletion(-) create mode 160000 vendor/grammars/PogoScript.tmbundle diff --git a/.gitmodules b/.gitmodules index e7bcdac5..016d28e9 100644 --- a/.gitmodules +++ b/.gitmodules @@ -606,3 +606,6 @@ [submodule "vendor/grammars/sublime-spintools"] path = vendor/grammars/sublime-spintools url = https://github.com/bitbased/sublime-spintools +[submodule "vendor/grammars/PogoScript.tmbundle"] + path = vendor/grammars/PogoScript.tmbundle + url = https://github.com/featurist/PogoScript.tmbundle diff --git a/grammars.yml b/grammars.yml index ded5e7cb..cfaa8bfc 100644 --- a/grammars.yml +++ b/grammars.yml @@ -72,6 +72,8 @@ vendor/grammars/NimLime: - source.nimcfg vendor/grammars/PHP-Twig.tmbundle: - text.html.twig +vendor/grammars/PogoScript.tmbundle/: +- source.pogoscript vendor/grammars/RDoc.tmbundle: - text.rdoc vendor/grammars/Racket: diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index b02b4148..cb274d59 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -2276,7 +2276,7 @@ PogoScript: color: "#d80074" extensions: - .pogo - tm_scope: none + tm_scope: source.pogoscript ace_mode: text PostScript: diff --git a/vendor/grammars/PogoScript.tmbundle b/vendor/grammars/PogoScript.tmbundle new file mode 160000 index 00000000..2255586f --- /dev/null +++ b/vendor/grammars/PogoScript.tmbundle @@ -0,0 +1 @@ +Subproject commit 2255586f9ec69bab052b2250615db9b824774178 From 0019abe5e7f8f63fb9e23a1d499adc119b8b6dcc Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Sun, 8 Feb 2015 11:45:54 +0100 Subject: [PATCH 5/8] Opal grammar from Sublime Text package --- .gitmodules | 3 +++ grammars.yml | 3 +++ lib/linguist/languages.yml | 2 +- vendor/grammars/sublime-opal | 1 + 4 files changed, 8 insertions(+), 1 deletion(-) create mode 160000 vendor/grammars/sublime-opal diff --git a/.gitmodules b/.gitmodules index 016d28e9..65e6843d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -609,3 +609,6 @@ [submodule "vendor/grammars/PogoScript.tmbundle"] path = vendor/grammars/PogoScript.tmbundle url = https://github.com/featurist/PogoScript.tmbundle +[submodule "vendor/grammars/sublime-opal"] + path = vendor/grammars/sublime-opal + url = https://github.com/artifactz/sublime-opal diff --git a/grammars.yml b/grammars.yml index cfaa8bfc..8774c5ea 100644 --- a/grammars.yml +++ b/grammars.yml @@ -461,6 +461,9 @@ vendor/grammars/sublime-nginx: - source.nginx vendor/grammars/sublime-nix: - source.nix +vendor/grammars/sublime-opal/: +- source.opal +- source.opalsysdefs vendor/grammars/sublime-robot-plugin: - text.robot vendor/grammars/sublime-rust: diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index cb274d59..5321c940 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -2052,7 +2052,7 @@ Opal: color: "#f7ede0" extensions: - .opal - tm_scope: none + tm_scope: source.opal ace_mode: text OpenCL: diff --git a/vendor/grammars/sublime-opal b/vendor/grammars/sublime-opal new file mode 160000 index 00000000..55ae90b9 --- /dev/null +++ b/vendor/grammars/sublime-opal @@ -0,0 +1 @@ +Subproject commit 55ae90b910933889d01c55766424db5b3e10332e From 11f7e6e1b4e53e4bdd47580353384d6eb6bbec3a Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Mon, 9 Feb 2015 21:29:53 +0100 Subject: [PATCH 6/8] Add Papyrus and GAP grammars to whitelist --- test/test_grammars.rb | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/test/test_grammars.rb b/test/test_grammars.rb index 188bc187..f30289a6 100644 --- a/test/test_grammars.rb +++ b/test/test_grammars.rb @@ -3,12 +3,16 @@ require_relative "./helper" class TestGrammars < Minitest::Test ROOT = File.expand_path("../..", __FILE__) - # These grammars have no license but have been grandfathered in. New grammars - # must have a license that allows redistribution. - UNLICENSED_GRAMMARS_WHITELIST = %w[ - vendor/grammars/Sublime-Lasso - vendor/grammars/Sublime-REBOL - vendor/grammars/x86-assembly-textmate-bundle + LICENSE_WHITELIST = [ + # This grammar's MIT license is inside a subdirectory. + "vendor/grammars/SublimePapyrus", + "vendor/grammars/gap-tmbundle", + + # These grammars have no license but have been grandfathered in. New grammars + # must have a license that allows redistribution. + "vendor/grammars/Sublime-Lasso", + "vendor/grammars/Sublime-REBOL", + "vendor/grammars/x86-assembly-textmate-bundle", ].freeze def setup @@ -77,9 +81,9 @@ class TestGrammars < Minitest::Test unlicensed = categories[:unlicensed] || [] unrecognized = categories[:unrecognized] || [] - disallowed_unlicensed = unlicensed - UNLICENSED_GRAMMARS_WHITELIST - disallowed_unrecognized = unrecognized - UNLICENSED_GRAMMARS_WHITELIST - extra_whitelist_entries = UNLICENSED_GRAMMARS_WHITELIST - (unlicensed | unrecognized) + disallowed_unlicensed = unlicensed - LICENSE_WHITELIST + disallowed_unrecognized = unrecognized - LICENSE_WHITELIST + extra_whitelist_entries = LICENSE_WHITELIST - (unlicensed | unrecognized) message = "" if disallowed_unlicensed.any? @@ -93,7 +97,7 @@ class TestGrammars < Minitest::Test end if extra_whitelist_entries.any? message << "\n\n" unless message.empty? - message << "The following grammar submodules are listed in UNLICENSED_GRAMMARS_WHITELIST but either have a license (yay!)\n" + message << "The following grammar submodules are listed in LICENSE_WHITELIST but either have a license (yay!)\n" message << "or have been removed from the repository. Please remove them from the whitelist.\n" message << extra_whitelist_entries.sort.join("\n") end From d11b2f05bb1bc106d5617f6d3fbd2b391a95c005 Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Mon, 9 Feb 2015 22:57:19 +0100 Subject: [PATCH 7/8] Detection of zlib license --- test/test_grammars.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/test_grammars.rb b/test/test_grammars.rb index f30289a6..f71446d8 100644 --- a/test/test_grammars.rb +++ b/test/test_grammars.rb @@ -135,6 +135,8 @@ class TestGrammars < Minitest::Test "unlicense" elsif content.include?("http://www.wtfpl.net/txt/copying/") "WTFPL" + elsif content.include?("zlib") && content.include?("license") && content.include?("2. Altered source versions must be plainly marked as such") + "zlib" end end end From 4eb8903bed2c509eaedf80aee4840072179d41db Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Mon, 9 Feb 2015 23:01:24 +0100 Subject: [PATCH 8/8] Comment for GAP grammar in whitelist --- test/test_grammars.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/test_grammars.rb b/test/test_grammars.rb index f71446d8..18cbce28 100644 --- a/test/test_grammars.rb +++ b/test/test_grammars.rb @@ -6,6 +6,8 @@ class TestGrammars < Minitest::Test LICENSE_WHITELIST = [ # This grammar's MIT license is inside a subdirectory. "vendor/grammars/SublimePapyrus", + + # This grammar has a nonstandard but acceptable license. "vendor/grammars/gap-tmbundle", # These grammars have no license but have been grandfathered in. New grammars