mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-12-08 20:38:47 +00:00
Merge pull request #2089 from pchaigno/new-grammars
Grammar for 5 languages
This commit is contained in:
15
.gitmodules
vendored
15
.gitmodules
vendored
@@ -597,6 +597,21 @@
|
|||||||
[submodule "vendor/grammars/InnoSetup"]
|
[submodule "vendor/grammars/InnoSetup"]
|
||||||
path = vendor/grammars/InnoSetup
|
path = vendor/grammars/InnoSetup
|
||||||
url = https://github.com/idleberg/InnoSetup-Sublime-Text
|
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
|
||||||
|
[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
|
||||||
|
[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
|
||||||
[submodule "vendor/grammars/mediawiki.tmbundle"]
|
[submodule "vendor/grammars/mediawiki.tmbundle"]
|
||||||
path = vendor/grammars/mediawiki.tmbundle
|
path = vendor/grammars/mediawiki.tmbundle
|
||||||
url = https://github.com/textmate/mediawiki.tmbundle
|
url = https://github.com/textmate/mediawiki.tmbundle
|
||||||
|
|||||||
14
grammars.yml
14
grammars.yml
@@ -72,6 +72,8 @@ vendor/grammars/NimLime:
|
|||||||
- source.nimcfg
|
- source.nimcfg
|
||||||
vendor/grammars/PHP-Twig.tmbundle:
|
vendor/grammars/PHP-Twig.tmbundle:
|
||||||
- text.html.twig
|
- text.html.twig
|
||||||
|
vendor/grammars/PogoScript.tmbundle/:
|
||||||
|
- source.pogoscript
|
||||||
vendor/grammars/RDoc.tmbundle:
|
vendor/grammars/RDoc.tmbundle:
|
||||||
- text.rdoc
|
- text.rdoc
|
||||||
vendor/grammars/Racket:
|
vendor/grammars/Racket:
|
||||||
@@ -112,6 +114,10 @@ vendor/grammars/Sublime-VimL:
|
|||||||
- source.viml
|
- source.viml
|
||||||
vendor/grammars/SublimeBrainfuck:
|
vendor/grammars/SublimeBrainfuck:
|
||||||
- source.bf
|
- source.bf
|
||||||
|
vendor/grammars/SublimePapyrus/:
|
||||||
|
- source.compiled-papyrus
|
||||||
|
- source.papyrus
|
||||||
|
- source.papyrus-assembly
|
||||||
vendor/grammars/SublimeXtend:
|
vendor/grammars/SublimeXtend:
|
||||||
- source.xtend
|
- source.xtend
|
||||||
vendor/grammars/TXL/:
|
vendor/grammars/TXL/:
|
||||||
@@ -225,6 +231,8 @@ vendor/grammars/fortran.tmbundle:
|
|||||||
- source.fortran.modern
|
- source.fortran.modern
|
||||||
vendor/grammars/fsharpbinding:
|
vendor/grammars/fsharpbinding:
|
||||||
- source.fsharp
|
- source.fsharp
|
||||||
|
vendor/grammars/gap-tmbundle/:
|
||||||
|
- source.gap
|
||||||
vendor/grammars/gettext.tmbundle:
|
vendor/grammars/gettext.tmbundle:
|
||||||
- source.po
|
- source.po
|
||||||
vendor/grammars/gnuplot-tmbundle:
|
vendor/grammars/gnuplot-tmbundle:
|
||||||
@@ -455,12 +463,18 @@ vendor/grammars/sublime-nginx:
|
|||||||
- source.nginx
|
- source.nginx
|
||||||
vendor/grammars/sublime-nix:
|
vendor/grammars/sublime-nix:
|
||||||
- source.nix
|
- source.nix
|
||||||
|
vendor/grammars/sublime-opal/:
|
||||||
|
- source.opal
|
||||||
|
- source.opalsysdefs
|
||||||
vendor/grammars/sublime-robot-plugin:
|
vendor/grammars/sublime-robot-plugin:
|
||||||
- text.robot
|
- text.robot
|
||||||
vendor/grammars/sublime-rust:
|
vendor/grammars/sublime-rust:
|
||||||
- source.rust
|
- source.rust
|
||||||
vendor/grammars/sublime-sourcepawn:
|
vendor/grammars/sublime-sourcepawn:
|
||||||
- source.sp
|
- source.sp
|
||||||
|
vendor/grammars/sublime-spintools/:
|
||||||
|
- source.regexp.spin
|
||||||
|
- source.spin
|
||||||
vendor/grammars/sublime-tea:
|
vendor/grammars/sublime-tea:
|
||||||
- source.tea
|
- source.tea
|
||||||
vendor/grammars/sublime-text-ox/:
|
vendor/grammars/sublime-text-ox/:
|
||||||
|
|||||||
@@ -961,7 +961,7 @@ GAP:
|
|||||||
- .gd
|
- .gd
|
||||||
- .gi
|
- .gi
|
||||||
- .tst
|
- .tst
|
||||||
tm_scope: none
|
tm_scope: source.gap
|
||||||
ace_mode: text
|
ace_mode: text
|
||||||
|
|
||||||
GAS:
|
GAS:
|
||||||
@@ -2052,7 +2052,7 @@ Opal:
|
|||||||
color: "#f7ede0"
|
color: "#f7ede0"
|
||||||
extensions:
|
extensions:
|
||||||
- .opal
|
- .opal
|
||||||
tm_scope: none
|
tm_scope: source.opal
|
||||||
ace_mode: text
|
ace_mode: text
|
||||||
|
|
||||||
OpenCL:
|
OpenCL:
|
||||||
@@ -2158,7 +2158,7 @@ Papyrus:
|
|||||||
color: "#6600cc"
|
color: "#6600cc"
|
||||||
extensions:
|
extensions:
|
||||||
- .psc
|
- .psc
|
||||||
tm_scope: none
|
tm_scope: source.papyrus
|
||||||
ace_mode: text
|
ace_mode: text
|
||||||
|
|
||||||
Parrot:
|
Parrot:
|
||||||
@@ -2276,7 +2276,7 @@ PogoScript:
|
|||||||
color: "#d80074"
|
color: "#d80074"
|
||||||
extensions:
|
extensions:
|
||||||
- .pogo
|
- .pogo
|
||||||
tm_scope: none
|
tm_scope: source.pogoscript
|
||||||
ace_mode: text
|
ace_mode: text
|
||||||
|
|
||||||
PostScript:
|
PostScript:
|
||||||
@@ -2323,7 +2323,7 @@ Propeller Spin:
|
|||||||
color: "#2b446d"
|
color: "#2b446d"
|
||||||
extensions:
|
extensions:
|
||||||
- .spin
|
- .spin
|
||||||
tm_scope: none
|
tm_scope: source.spin
|
||||||
ace_mode: text
|
ace_mode: text
|
||||||
|
|
||||||
Protocol Buffer:
|
Protocol Buffer:
|
||||||
|
|||||||
@@ -3,12 +3,18 @@ require_relative "./helper"
|
|||||||
class TestGrammars < Minitest::Test
|
class TestGrammars < Minitest::Test
|
||||||
ROOT = File.expand_path("../..", __FILE__)
|
ROOT = File.expand_path("../..", __FILE__)
|
||||||
|
|
||||||
|
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
|
# These grammars have no license but have been grandfathered in. New grammars
|
||||||
# must have a license that allows redistribution.
|
# must have a license that allows redistribution.
|
||||||
UNLICENSED_GRAMMARS_WHITELIST = %w[
|
"vendor/grammars/Sublime-Lasso",
|
||||||
vendor/grammars/Sublime-Lasso
|
"vendor/grammars/Sublime-REBOL",
|
||||||
vendor/grammars/Sublime-REBOL
|
"vendor/grammars/x86-assembly-textmate-bundle",
|
||||||
vendor/grammars/x86-assembly-textmate-bundle
|
|
||||||
].freeze
|
].freeze
|
||||||
|
|
||||||
def setup
|
def setup
|
||||||
@@ -77,9 +83,9 @@ class TestGrammars < Minitest::Test
|
|||||||
|
|
||||||
unlicensed = categories[:unlicensed] || []
|
unlicensed = categories[:unlicensed] || []
|
||||||
unrecognized = categories[:unrecognized] || []
|
unrecognized = categories[:unrecognized] || []
|
||||||
disallowed_unlicensed = unlicensed - UNLICENSED_GRAMMARS_WHITELIST
|
disallowed_unlicensed = unlicensed - LICENSE_WHITELIST
|
||||||
disallowed_unrecognized = unrecognized - UNLICENSED_GRAMMARS_WHITELIST
|
disallowed_unrecognized = unrecognized - LICENSE_WHITELIST
|
||||||
extra_whitelist_entries = UNLICENSED_GRAMMARS_WHITELIST - (unlicensed | unrecognized)
|
extra_whitelist_entries = LICENSE_WHITELIST - (unlicensed | unrecognized)
|
||||||
|
|
||||||
message = ""
|
message = ""
|
||||||
if disallowed_unlicensed.any?
|
if disallowed_unlicensed.any?
|
||||||
@@ -93,7 +99,7 @@ class TestGrammars < Minitest::Test
|
|||||||
end
|
end
|
||||||
if extra_whitelist_entries.any?
|
if extra_whitelist_entries.any?
|
||||||
message << "\n\n" unless message.empty?
|
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 << "or have been removed from the repository. Please remove them from the whitelist.\n"
|
||||||
message << extra_whitelist_entries.sort.join("\n")
|
message << extra_whitelist_entries.sort.join("\n")
|
||||||
end
|
end
|
||||||
@@ -131,6 +137,8 @@ class TestGrammars < Minitest::Test
|
|||||||
"unlicense"
|
"unlicense"
|
||||||
elsif content.include?("http://www.wtfpl.net/txt/copying/")
|
elsif content.include?("http://www.wtfpl.net/txt/copying/")
|
||||||
"WTFPL"
|
"WTFPL"
|
||||||
|
elsif content.include?("zlib") && content.include?("license") && content.include?("2. Altered source versions must be plainly marked as such")
|
||||||
|
"zlib"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
1
vendor/grammars/PogoScript.tmbundle
vendored
Submodule
1
vendor/grammars/PogoScript.tmbundle
vendored
Submodule
Submodule vendor/grammars/PogoScript.tmbundle added at 2255586f9e
1
vendor/grammars/SublimePapyrus
vendored
Submodule
1
vendor/grammars/SublimePapyrus
vendored
Submodule
Submodule vendor/grammars/SublimePapyrus added at 5a7b3e7b29
1
vendor/grammars/gap-tmbundle
vendored
Submodule
1
vendor/grammars/gap-tmbundle
vendored
Submodule
Submodule vendor/grammars/gap-tmbundle added at 291a0469dd
1
vendor/grammars/sublime-opal
vendored
Submodule
1
vendor/grammars/sublime-opal
vendored
Submodule
Submodule vendor/grammars/sublime-opal added at 55ae90b910
1
vendor/grammars/sublime-spintools
vendored
Submodule
1
vendor/grammars/sublime-spintools
vendored
Submodule
Submodule vendor/grammars/sublime-spintools added at 56d326a44e
Reference in New Issue
Block a user