Compare commits

...

17 Commits

Author SHA1 Message Date
Adam Roben
875b3157bf Merge pull request #1757 from github/cut-release-v4.0.3
Bump version to 4.0.3
2014-11-21 12:06:38 -05:00
Adam Roben
4ce9048f8d Bump version to 4.0.3 2014-11-21 11:56:17 -05:00
Adam Roben
04f1b1df48 Merge pull request #1756 from github/test-for-grammars
Test that all languages have grammars
2014-11-21 11:54:46 -05:00
Adam Roben
f9c36345c3 Add some docs for tm_scope 2014-11-21 11:53:52 -05:00
Adam Roben
ec3967d080 Change NONE to none
NONE is a little shouty.
2014-11-21 11:52:29 -05:00
Arfon Smith
05a88b5b7e Merge pull request #1754 from github/chart-js
Chart js
2014-11-21 09:30:20 -06:00
Arfon Smith
b6b2cf04a7 Checking other case for Chart.jS 2014-11-21 09:29:28 -06:00
Adam Roben
49247e9ec2 Test that all languages have grammars
This will make CI fail if someone adds a new language but neglects to
add a new grammar for it. This should make it easier for people to
review PRs, as CI will help them to make sure a new grammar gets added.

However, we currently support some languages that have no grammars, and
we may support more in the future. So you can explicitly mark the
language as having no grammar by setting `tm_scope: NONE` in
languages.yml.
2014-11-21 09:48:52 -05:00
Adam Roben
6629b75aa6 Merge pull request #1755 from github/fix-rhtml-scope
Fix RHTML's tm_scope
2014-11-21 09:31:07 -05:00
Adam Roben
e702b453ec Fix RHTML's tm_scope
I missed this back in 9595e2ba7e.
2014-11-21 09:29:06 -05:00
Arfon Smith
38190d92fc Chart JS is vendored 2014-11-21 08:24:33 -06:00
Adam Roben
109ca5735b Merge pull request #1753 from github/better-bro-grammar
Switch to a better grammar for Bro
2014-11-21 09:23:28 -05:00
Adam Roben
4dde499f51 Switch to a better grammar for Bro
This grammar seems to be replacing the other ones out there and is
maintained by the Bro organization.
2014-11-21 09:17:19 -05:00
Vicent Marti
5fd18a215e Merge pull request #1752 from github/sqf-grammar
Use a SQF grammar for SQF files
2014-11-21 11:31:50 +01:00
Adam Roben
2054afc741 Use a SQF grammar for SQF files
This produces better highlighting than using the C++ grammar.

The grammar is licensed under the Apache 2.0 license.
2014-11-20 17:22:55 -05:00
Brandon Keepers
231ad86176 sync cached gems 2014-11-20 08:51:56 -05:00
Florian Kaiser
9658b02502 add Chart.js as vendor
http://www.chartjs.org
2014-11-20 10:02:45 +01:00
8 changed files with 106 additions and 6 deletions

View File

@@ -38,6 +38,8 @@ https://github.com/Drako/SublimeBrainfuck/raw/master/Brainfuck.tmLanguage:
- source.bf
https://github.com/JohnNilsson/awk-sublime/raw/master/AWK.tmLanguage:
- source.awk
https://github.com/JonBons/Sublime-SQF-Language:
- source.sqf
https://github.com/MarioRicalde/SCSS.tmbundle:
- source.scss
https://github.com/Oldes/Sublime-REBOL:
@@ -97,6 +99,8 @@ https://github.com/bholt/chapel-tmbundle:
- source.chapel
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:
- text.groff
https://github.com/ccreutzig/sublime-MuPAD:
@@ -215,9 +219,6 @@ https://github.com/slavapestov/factor/raw/master/misc/Factor.tmbundle/Syntaxes/F
- source.factor
https://github.com/slim-template/ruby-slim.tmbundle:
- text.slim
https://github.com/smiledawgg/Bro.tmbundle:
- source.bro
- source.bro.sig
https://github.com/staltz/SublimeXtend:
- source.xtend
https://github.com/statatmbundle/Stata.tmbundle:

View File

@@ -12,6 +12,10 @@
# search_term - Deprecated: Some languages maybe indexed under a
# different alias. Avoid defining new exceptions.
# color - CSS hex color to represent the language.
# tm_scope - The TextMate scope that represents this programming
# language. This should match one of the scopes listed in
# the grammars.yml file. Use "none" if there is no grammar
# for this language.
#
# Any additions or modifications (even trivial) should have corresponding
# test change in `test/test_blob.rb`.
@@ -45,6 +49,7 @@ APL:
extensions:
- .apl
- .dyalog
tm_scope: none
ASP:
type: programming
@@ -146,6 +151,7 @@ Arc:
color: "#ca2afe"
extensions:
- .arc
tm_scope: none
Arduino:
type: programming
@@ -162,12 +168,14 @@ AsciiDoc:
- .asciidoc
- .adoc
- .asc
tm_scope: none
AspectJ:
type: programming
color: "#1957b0"
extensions:
- .aj
tm_scope: none
Assembly:
type: programming
@@ -185,6 +193,7 @@ Augeas:
type: programming
extensions:
- .aug
tm_scope: none
AutoHotkey:
type: programming
@@ -194,6 +203,7 @@ AutoHotkey:
extensions:
- .ahk
- .ahkl
tm_scope: none
AutoIt:
type: programming
@@ -286,6 +296,7 @@ Brightscript:
type: programming
extensions:
- .brs
tm_scope: none
Bro:
type: programming
@@ -359,6 +370,7 @@ CLIPS:
type: programming
extensions:
- .clp
tm_scope: none
CMake:
extensions:
@@ -421,6 +433,7 @@ Clean:
extensions:
- .icl
- .dcl
tm_scope: none
Clojure:
type: programming
@@ -537,6 +550,7 @@ Creole:
wrap: true
extensions:
- .creole
tm_scope: none
Crystal:
type: programming
@@ -604,6 +618,7 @@ Darcs Patch:
extensions:
- .darcspatch
- .dpatch
tm_scope: none
Dart:
type: programming
@@ -631,6 +646,7 @@ Dogescript:
color: "#cca760"
extensions:
- .djs
tm_scope: none
Dylan:
type: programming
@@ -646,6 +662,7 @@ E:
color: "#ccce35"
extensions:
- .E
tm_scope: none
ECL:
type: programming
@@ -653,6 +670,7 @@ ECL:
extensions:
- .ecl
- .eclxml
tm_scope: none
Eagle:
type: markup
@@ -736,6 +754,7 @@ FLUX:
extensions:
- .fx
- .flux
tm_scope: none
FORTRAN:
type: programming
@@ -809,11 +828,13 @@ G-code:
- .g
- .gco
- .gcode
tm_scope: none
GAMS:
type: programming
extensions:
- .gms
tm_scope: none
GAP:
type: programming
@@ -822,6 +843,7 @@ GAP:
- .gap
- .gd
- .gi
tm_scope: none
GAS:
type: programming
@@ -835,6 +857,7 @@ GDScript:
type: programming
extensions:
- .gd
tm_scope: none
GLSL:
group: C
@@ -919,6 +942,7 @@ Golo:
color: "#f6a51f"
extensions:
- .golo
tm_scope: none
Gosu:
type: programming
@@ -934,6 +958,7 @@ Grace:
type: programming
extensions:
- .grace
tm_scope: none
Grammatical Framework:
type: programming
@@ -950,6 +975,7 @@ Graph Modeling Language:
type: data
extensions:
- .gml
tm_scope: none
Graphviz (DOT):
type: data
@@ -1039,6 +1065,7 @@ HTTP:
type: data
extensions:
- .http
tm_scope: none
Hack:
type: programming
@@ -1046,6 +1073,7 @@ Hack:
extensions:
- .hh
- .php
tm_scope: none
Haml:
group: HTML
@@ -1068,6 +1096,7 @@ Harbour:
color: "#0e60e3"
extensions:
- .hb
tm_scope: none
Haskell:
type: programming
@@ -1093,6 +1122,7 @@ Hy:
- .hy
aliases:
- hylang
tm_scope: none
IDL:
type: programming
@@ -1108,6 +1138,7 @@ IGOR Pro:
aliases:
- igor
- igorpro
tm_scope: none
INI:
type: data
@@ -1128,6 +1159,7 @@ IRC log:
extensions:
- .irclog
- .weechatlog
tm_scope: none
Idris:
type: programming
@@ -1149,6 +1181,7 @@ Inform 7:
Inno Setup:
extensions:
- .iss
tm_scope: none
Io:
type: programming
@@ -1167,11 +1200,13 @@ Isabelle:
color: "#fdcd00"
extensions:
- .thy
tm_scope: none
J:
type: programming
extensions:
- .ijs
tm_scope: none
JSON:
type: data
@@ -1279,6 +1314,7 @@ KRL:
color: "#f5c800"
extensions:
- .krl
tm_scope: none
Kit:
type: markup
@@ -1312,6 +1348,7 @@ LOLCODE:
extensions:
- .lol
color: "#cc9900"
tm_scope: none
LSL:
type: programming
@@ -1326,6 +1363,7 @@ LabVIEW:
type: programming
extensions:
- .lvproj
tm_scope: none
Lasso:
type: programming
@@ -1364,12 +1402,14 @@ Liquid:
type: markup
extensions:
- .liquid
tm_scope: none
Literate Agda:
type: programming
group: Agda
extensions:
- .lagda
tm_scope: none
Literate CoffeeScript:
type: programming
@@ -1546,6 +1586,7 @@ MediaWiki:
wrap: true
extensions:
- .mediawiki
tm_scope: none
Mercury:
type: programming
@@ -1560,6 +1601,7 @@ MiniD: # Legacy
searchable: false
extensions:
- .minid # Dummy extension
tm_scope: none
Mirah:
type: programming
@@ -1581,6 +1623,7 @@ Moocode:
type: programming
extensions:
- .moo
tm_scope: none
MoonScript:
type: programming
@@ -1592,6 +1635,7 @@ MoonScript:
Myghty:
extensions:
- .myt
tm_scope: none
NSIS:
extensions:
@@ -1637,6 +1681,7 @@ Nit:
color: "#0d8921"
extensions:
- .nit
tm_scope: none
Nix:
type: programming
@@ -1644,6 +1689,7 @@ Nix:
- .nix
aliases:
- nixos
tm_scope: none
Nu:
type: programming
@@ -1662,6 +1708,7 @@ NumPy:
- .numpy
- .numpyw
- .numsc
tm_scope: none
OCaml:
type: programming
@@ -1722,6 +1769,7 @@ Omgrofl:
extensions:
- .omgrofl
color: "#cabbff"
tm_scope: none
Opa:
type: programming
@@ -1733,6 +1781,7 @@ Opal:
color: "#f7ede0"
extensions:
- .opal
tm_scope: none
OpenCL:
type: programming
@@ -1757,12 +1806,14 @@ OpenSCAD:
type: programming
extensions:
- .scad
tm_scope: none
Org:
type: prose
wrap: true
extensions:
- .org
tm_scope: none
Ox:
type: programming
@@ -1770,12 +1821,14 @@ Ox:
- .ox
- .oxh
- .oxo
tm_scope: none
Oxygene:
type: programming
color: "#5a63a3"
extensions:
- .oxygene
tm_scope: none
PAWN:
type: programming
@@ -1811,18 +1864,21 @@ Pan:
color: '#cc0000'
extensions:
- .pan
tm_scope: none
Papyrus:
type: programming
color: "#6600cc"
extensions:
- .psc
tm_scope: none
Parrot:
type: programming
color: "#f3ca0a"
extensions:
- .parrot # Dummy extension
tm_scope: none
Parrot Assembly:
group: Parrot
@@ -1831,6 +1887,7 @@ Parrot Assembly:
- pasm
extensions:
- .pasm
tm_scope: none
Parrot Internal Representation:
group: Parrot
@@ -1882,12 +1939,14 @@ Perl6:
- .p6m
- .pl6
- .pm6
tm_scope: none
PigLatin:
type: programming
color: "#fcd7de"
extensions:
- .pig
tm_scope: none
Pike:
type: programming
@@ -1902,12 +1961,14 @@ Pod:
wrap: true
extensions:
- .pod
tm_scope: none
PogoScript:
type: programming
color: "#d80074"
extensions:
- .pogo
tm_scope: none
PostScript:
type: markup
@@ -1948,6 +2009,7 @@ Propeller Spin:
color: "#2b446d"
extensions:
- .spin
tm_scope: none
Protocol Buffer:
type: markup
@@ -1971,6 +2033,7 @@ Pure Data:
color: "#91de79"
extensions:
- .pd
tm_scope: none
PureScript:
type: programming
@@ -2066,7 +2129,7 @@ RHTML:
group: HTML
extensions:
- .rhtml
tm_scope: text.html.ruby
tm_scope: text.html.erb
aliases:
- html+ruby
@@ -2077,6 +2140,7 @@ RMarkdown:
extensions:
- .rmd
- .Rmd
tm_scope: none
Racket:
type: programming
@@ -2096,6 +2160,7 @@ Ragel in Ruby Host:
aliases:
- ragel-rb
- ragel-ruby
tm_scope: none
Raw token data:
search_term: raw
@@ -2103,6 +2168,7 @@ Raw token data:
- raw
extensions:
- .raw
tm_scope: none
Rebol:
type: programming
@@ -2122,10 +2188,12 @@ Red:
- .reds
aliases:
- red/system
tm_scope: none
Redcode:
extensions:
- .cw
tm_scope: none
RobotFramework:
type: programming
@@ -2199,6 +2267,7 @@ SAS:
color: "#1E90FF"
extensions:
- .sas
tm_scope: none
SCSS:
type: markup
@@ -2214,7 +2283,7 @@ SQF:
extensions:
- .sqf
- .hqf
tm_scope: source.c++
tm_scope: source.sqf
SQL:
type: data
@@ -2292,6 +2361,7 @@ Self:
color: "#0579aa"
extensions:
- .self
tm_scope: none
Shell:
type: programming
@@ -2330,6 +2400,7 @@ Shen:
color: "#120F14"
extensions:
- .shen
tm_scope: none
Slash:
type: programming
@@ -2400,6 +2471,7 @@ Stylus:
group: CSS
extensions:
- .styl
tm_scope: none
SuperCollider:
type: programming
@@ -2407,6 +2479,7 @@ SuperCollider:
extensions:
- .scd
- .sc
tm_scope: none
Swift:
type: programming
@@ -2432,6 +2505,7 @@ TXL:
type: programming
extensions:
- .txl
tm_scope: none
Tcl:
type: programming
@@ -2488,6 +2562,7 @@ Textile:
wrap: true
extensions:
- .textile
tm_scope: none
Thrift:
type: programming
@@ -2501,6 +2576,7 @@ Turing:
extensions:
- .t
- .tu
tm_scope: none
Twig:
type: markup
@@ -2761,6 +2837,7 @@ Zimpl:
- .zimpl
- .zmpl
- .zpl
tm_scope: none
eC:
type: programming
@@ -2768,6 +2845,7 @@ eC:
extensions:
- .ec
- .eh
tm_scope: none
edn:
type: data
@@ -2782,6 +2860,7 @@ fish:
group: Shell
extensions:
- .fish
tm_scope: none
mupad:
extensions:
@@ -2822,3 +2901,4 @@ xBase:
color: "#3a4040"
extensions:
- .prg
tm_scope: none

View File

@@ -110,6 +110,9 @@
# MathJax
- (^|/)MathJax/
# Chart.js
- (^|/)Chart\.js$
# Codemirror
- (^|/)[Cc]ode[Mm]irror/(lib|mode|theme|addon|keymap)

View File

@@ -1,3 +1,3 @@
module Linguist
VERSION = "4.0.2"
VERSION = "4.0.3"
end

View File

@@ -297,6 +297,10 @@ class TestBlob < Test::Unit::TestCase
assert blob("deps/http_parser/http_parser.c").vendored?
assert blob("deps/v8/src/v8.h").vendored?
# Chart.js
assert blob("some/vendored/path/Chart.js").vendored?
assert !blob("some/vendored/path/chart.js").vendored?
# Codemirror deps
assert blob("codemirror/mode/blah.js").vendored?

View File

@@ -1,5 +1,6 @@
require 'linguist/language'
require 'test/unit'
require 'yaml'
class TestLanguage < Test::Unit::TestCase
include Linguist
@@ -359,4 +360,15 @@ class TestLanguage < Test::Unit::TestCase
def test_by_type
assert !Language.by_type(:prose).nil?
end
def test_all_languages_have_grammars
scopes = YAML.load(File.read(File.expand_path("../../grammars.yml", __FILE__))).values.flatten
missing = Language.all.reject { |language| language.tm_scope == "none" || scopes.include?(language.tm_scope) }
message = "The following languages' scopes are not listed in grammars.yml. Please add grammars for all new languages.\n"
message << "If no grammar exists for a language, mark the language with `tm_scope: none` in lib/linguist/languages.yml.\n"
width = missing.map { |language| language.name.length }.max
message << missing.map { |language| sprintf("%-#{width}s %s", language.name, language.tm_scope) }.sort.join("\n")
assert missing.empty?, message
end
end

BIN
vendor/cache/mime-types-2.4.3.gem vendored Normal file

Binary file not shown.

BIN
vendor/cache/yajl-ruby-1.2.1.gem vendored Normal file

Binary file not shown.