mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 09:40:21 +00:00
Merge pull request #1891 from github/fix-grammars
Fix some bugs in grammars.yml
This commit is contained in:
73
grammars.yml
73
grammars.yml
@@ -26,13 +26,13 @@ https://github.com/AlanQuatermain/go-tmbundle:
|
||||
- source.go
|
||||
https://github.com/Anomareh/PHP-Twig.tmbundle:
|
||||
- text.html.twig
|
||||
https://github.com/Cirru/sublime-cirru/raw/master/Cirru.tmLanguage:
|
||||
https://github.com/Cirru/sublime-cirru:
|
||||
- source.cirru
|
||||
https://github.com/Cykey/Sublime-Logos:
|
||||
- source.logos
|
||||
https://github.com/Drako/SublimeBrainfuck/raw/master/Brainfuck.tmLanguage:
|
||||
https://github.com/Drako/SublimeBrainfuck:
|
||||
- source.bf
|
||||
https://github.com/JohnNilsson/awk-sublime/raw/master/AWK.tmLanguage:
|
||||
https://github.com/JohnNilsson/awk-sublime:
|
||||
- source.awk
|
||||
https://github.com/JonBons/Sublime-SQF-Language:
|
||||
- source.sqf
|
||||
@@ -46,7 +46,7 @@ https://github.com/Red-Nova-Technologies/autoitv3-tmbundle:
|
||||
- source.autoit.3
|
||||
https://github.com/SalGnt/Sublime-VimL:
|
||||
- source.viml
|
||||
https://github.com/Shammah/boo-sublime/raw/master/Boo.tmLanguage:
|
||||
https://github.com/Shammah/boo-sublime:
|
||||
- source.boo
|
||||
https://github.com/SublimeText/ColdFusion:
|
||||
- source.cfscript
|
||||
@@ -74,6 +74,8 @@ https://github.com/aroben/ruby.tmbundle@4636a3023153c3034eb6ffc613899ba9cf33b41f
|
||||
- text.html.erb
|
||||
https://github.com/asbjornenge/Docker.tmbundle:
|
||||
- source.dockerfile
|
||||
https://github.com/atmarksharp/jasmin-sublime:
|
||||
- source.jasmin
|
||||
https://github.com/atom/language-clojure:
|
||||
- source.clojure
|
||||
https://github.com/atom/language-coffee-script:
|
||||
@@ -84,7 +86,7 @@ https://github.com/atom/language-csharp:
|
||||
- source.csx
|
||||
- source.nant-build
|
||||
https://github.com/atom/language-gfm:
|
||||
- text.html.markdown
|
||||
- source.gfm
|
||||
https://github.com/atom/language-javascript:
|
||||
- source.js
|
||||
- source.js.regexp
|
||||
@@ -110,7 +112,8 @@ https://github.com/brandonwamboldt/sublime-nginx:
|
||||
- source.nginx
|
||||
https://github.com/bro/bro-sublime:
|
||||
- source.bro
|
||||
https://github.com/carsonoid/sublime_man_page_support/raw/master/man-groff.tmLanguage:
|
||||
https://github.com/carsonoid/sublime_man_page_support:
|
||||
- source.man
|
||||
- text.groff
|
||||
https://github.com/ccreutzig/sublime-MuPAD:
|
||||
- source.mupad
|
||||
@@ -127,7 +130,7 @@ https://github.com/clemos/haxe-sublime-bundle:
|
||||
https://github.com/cucumber/cucumber-tmbundle:
|
||||
- source.ruby.rspec.cucumber.steps
|
||||
- text.gherkin.feature
|
||||
https://github.com/daaain/Handlebars/raw/master/Handlebars.tmLanguage:
|
||||
https://github.com/daaain/Handlebars:
|
||||
- text.html.handlebars
|
||||
https://github.com/davidpeckham/powershell.tmbundle:
|
||||
- source.powershell
|
||||
@@ -138,9 +141,12 @@ https://github.com/elixir-lang/elixir-tmbundle:
|
||||
- source.elixir
|
||||
- text.elixir
|
||||
- text.html.elixir
|
||||
https://github.com/eregon/oz-tmbundle/raw/master/Syntaxes/Oz.tmLanguage:
|
||||
- source.oz
|
||||
https://github.com/ericzou/ebundles/raw/master/Bundles/MSDOS%20batch%20file.tmbundle/Syntaxes/MSDOS%20batch%20file.tmLanguage:
|
||||
- source.dosbatch
|
||||
https://github.com/euler0/sublime-glsl/raw/master/GLSL.tmLanguage:
|
||||
https://github.com/euler0/sublime-glsl:
|
||||
- source.essl
|
||||
- source.glsl
|
||||
https://github.com/fancy-lang/fancy-tmbundle:
|
||||
- source.fancy
|
||||
@@ -148,27 +154,32 @@ https://github.com/fsharp/fsharpbinding:
|
||||
- source.fsharp
|
||||
https://github.com/gingerbeardman/monkey.tmbundle:
|
||||
- source.monkey
|
||||
https://github.com/guillermooo/dart-sublime-bundle/raw/master/Dart.tmLanguage:
|
||||
https://github.com/guillermooo/dart-sublime-bundle:
|
||||
- source.dart
|
||||
https://github.com/harrism/sublimetext-cuda-cpp/raw/master/cuda-c%2B%2B.tmLanguage:
|
||||
- source.pubspec
|
||||
- text.dart-doccomments
|
||||
https://github.com/harrism/sublimetext-cuda-cpp:
|
||||
- source.cuda-c++
|
||||
https://github.com/hww3/pike-textmate:
|
||||
- source.pike
|
||||
https://github.com/jeancharles-roger/ceylon-sublimetext/raw/master/Ceylon.tmLanguage:
|
||||
https://github.com/jeancharles-roger/ceylon-sublimetext:
|
||||
- module.ceylon
|
||||
- source.ceylon
|
||||
https://github.com/jfairbank/Sublime-Text-2-OpenEdge-ABL:
|
||||
- source.abl
|
||||
https://github.com/jhasse/sublime-rust:
|
||||
- source.rust
|
||||
https://github.com/johanasplund/sublime-befunge/raw/master/Befunge-93.tmLanguage:
|
||||
https://github.com/johanasplund/sublime-befunge:
|
||||
- source.befunge
|
||||
https://github.com/joshaven/RDoc.tmbundle:
|
||||
- text.rdoc
|
||||
https://github.com/jpcamara/Textmate-Gosu-Bundle/raw/master/Gosu.tmbundle/Syntaxes/Gosu.tmLanguage:
|
||||
https://github.com/jpcamara/Textmate-Gosu-Bundle:
|
||||
- source.gosu.2
|
||||
https://github.com/kswedberg/jquery-tmbundle:
|
||||
- source.js.jquery
|
||||
https://github.com/laughedelic/sublime-idris/raw/master/Idris.tmLanguage:
|
||||
https://github.com/l15n/fish-tmbundle:
|
||||
- source.fish
|
||||
https://github.com/laughedelic/sublime-idris:
|
||||
- source.idris
|
||||
https://github.com/lavrton/sublime-better-typescript:
|
||||
- source.ts
|
||||
@@ -196,14 +207,15 @@ https://github.com/mgalloy/idl.tmbundle:
|
||||
- text.idl-idldoc
|
||||
https://github.com/michaeledgar/protobuf-tmbundle:
|
||||
- source.protobuf
|
||||
https://github.com/mkolosick/Sublime-Coq/raw/master/Coq.tmLanguage:
|
||||
https://github.com/mkolosick/Sublime-Coq:
|
||||
- source.coq
|
||||
https://github.com/mokus0/Agda.tmbundle:
|
||||
- source.agda
|
||||
https://github.com/nanoant/Julia.tmbundle:
|
||||
- source.julia
|
||||
https://github.com/nanoant/assembly.tmbundle/raw/master/Syntaxes/objdump%20C%2B%2B.tmLanguage:
|
||||
https://github.com/nanoant/assembly.tmbundle:
|
||||
- objdump.x86asm
|
||||
- source.x86asm
|
||||
https://github.com/nilium/ooc.tmbundle:
|
||||
- source.ooc
|
||||
https://github.com/paulmillr/LiveScript.tmbundle:
|
||||
@@ -217,6 +229,8 @@ https://github.com/pvl/abap.tmbundle:
|
||||
https://github.com/scalate/Scalate.tmbundle:
|
||||
- source.scaml
|
||||
- text.html.ssp
|
||||
https://github.com/sebgod/mercury-tmlanguage:
|
||||
- source.mercury
|
||||
https://github.com/shadanan/mathematica-tmbundle:
|
||||
- source.mathematica
|
||||
https://github.com/shellderp/sublime-robot-plugin:
|
||||
@@ -229,8 +243,9 @@ https://github.com/skozlovf/Sublime-QML:
|
||||
- source.qml
|
||||
https://github.com/slash-lang/Slash.tmbundle:
|
||||
- text.html.slash
|
||||
https://github.com/slavapestov/factor/raw/master/misc/Factor.tmbundle/Syntaxes/Factor.tmLanguage:
|
||||
https://github.com/slavapestov/factor:
|
||||
- source.factor
|
||||
- text.html.factor
|
||||
https://github.com/slim-template/ruby-slim.tmbundle:
|
||||
- text.slim
|
||||
https://github.com/staltz/SublimeXtend:
|
||||
@@ -240,6 +255,8 @@ https://github.com/statatmbundle/Stata.tmbundle:
|
||||
- source.stata
|
||||
https://github.com/technosophos/Vala-TMBundle:
|
||||
- source.vala
|
||||
https://github.com/tenbits/sublime-mask/raw/release/Syntaxes/mask.tmLanguage:
|
||||
- source.mask
|
||||
https://github.com/textmate/ant.tmbundle:
|
||||
- text.xml.ant
|
||||
https://github.com/textmate/antlr.tmbundle:
|
||||
@@ -254,10 +271,6 @@ https://github.com/textmate/asp.tmbundle:
|
||||
- text.html.asp
|
||||
https://github.com/textmate/bison.tmbundle:
|
||||
- source.bison
|
||||
https://github.com/vmg/c.tmbundle:
|
||||
- source.c
|
||||
- source.c++
|
||||
- source.c.platform
|
||||
https://github.com/textmate/capnproto.tmbundle:
|
||||
- source.capnp
|
||||
https://github.com/textmate/cmake.tmbundle:
|
||||
@@ -410,25 +423,17 @@ https://github.com/textmate/xml.tmbundle:
|
||||
- text.xml.xsl
|
||||
https://github.com/tomas-stefano/smalltalk-tmbundle:
|
||||
- source.smalltalk
|
||||
https://github.com/vic/ioke-outdated/raw/master/share/TextMate/Ioke.tmbundle/Syntaxes/Ioke.tmLanguage:
|
||||
https://github.com/vic/ioke-outdated:
|
||||
- source.ioke
|
||||
https://github.com/vkostyukov/kotlin-sublime-package:
|
||||
- source.Kotlin
|
||||
https://github.com/vmg/c.tmbundle:
|
||||
- source.c
|
||||
- source.c++
|
||||
- source.c.platform
|
||||
https://github.com/vmg/zephir-sublime:
|
||||
- source.php.zephir
|
||||
https://github.com/whitequark/llvm.tmbundle:
|
||||
- source.llvm
|
||||
https://github.com/wmertens/sublime-nix:
|
||||
- source.nix
|
||||
https://raw.githubusercontent.com/eregon/oz-tmbundle/master/Syntaxes/Oz.tmLanguage:
|
||||
- source.oz
|
||||
https://raw.githubusercontent.com/sebgod/mercury-tmlanguage/master/Mercury.tmLanguage:
|
||||
- source.mercury
|
||||
https://raw.githubusercontent.com/tenbits/sublime-mask/release/Syntaxes/mask.tmLanguage:
|
||||
- source.mask
|
||||
https://github.com/l15n/fish-tmbundle:
|
||||
- source.fish
|
||||
https://raw.githubusercontent.com/andik/IDL-Syntax/master/IDL.tmLanguage:
|
||||
- source.webidl
|
||||
https://raw.githubusercontent.com/atmarksharp/jasmin-sublime/master/Jasmin.tmLanguage:
|
||||
- source.jasmin
|
||||
|
||||
@@ -1725,7 +1725,7 @@ Markdown:
|
||||
- .mkdn
|
||||
- .mkdown
|
||||
- .ron
|
||||
tm_scope: text.html.markdown
|
||||
tm_scope: source.gfm
|
||||
|
||||
Mask:
|
||||
type: markup
|
||||
@@ -3057,7 +3057,7 @@ WebIDL:
|
||||
type: programming
|
||||
extensions:
|
||||
- .webidl
|
||||
tm_scope: source.webidl
|
||||
tm_scope: none
|
||||
ace_mode: text
|
||||
|
||||
XC:
|
||||
|
||||
13
test/test_grammars.rb
Normal file
13
test/test_grammars.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
require_relative "./helper"
|
||||
|
||||
class TestGrammars < Test::Unit::TestCase
|
||||
def setup
|
||||
@grammars = YAML.load(File.read(File.expand_path("../../grammars.yml", __FILE__)))
|
||||
end
|
||||
|
||||
def test_no_duplicate_scopes
|
||||
scopes = @grammars.values.flatten
|
||||
duplicates = scopes.group_by { |s| s }.select { |k, v| v.length > 1 }.map(&:first)
|
||||
assert duplicates.empty?, "The following scopes appear in grammars.yml more than once:\n#{duplicates.sort.join("\n")}"
|
||||
end
|
||||
end
|
||||
@@ -3,6 +3,7 @@ require_relative "./helper"
|
||||
class TestPedantic < Test::Unit::TestCase
|
||||
filename = File.expand_path("../../lib/linguist/languages.yml", __FILE__)
|
||||
LANGUAGES = YAML.load(File.read(filename))
|
||||
GRAMMARS = YAML.load(File.read(File.expand_path("../../grammars.yml", __FILE__)))
|
||||
|
||||
def test_language_names_are_sorted
|
||||
assert_sorted LANGUAGES.keys
|
||||
@@ -21,6 +22,16 @@ class TestPedantic < Test::Unit::TestCase
|
||||
end
|
||||
end
|
||||
|
||||
def test_grammars_are_sorted
|
||||
assert_sorted GRAMMARS.keys
|
||||
end
|
||||
|
||||
def test_scopes_are_sorted
|
||||
GRAMMARS.values.each do |scopes|
|
||||
assert_sorted scopes
|
||||
end
|
||||
end
|
||||
|
||||
def assert_sorted(list)
|
||||
list.each_cons(2) do |previous, item|
|
||||
flunk "#{previous} should come after #{item}" if previous > item
|
||||
|
||||
Reference in New Issue
Block a user