Merge branch 'master' of https://github.com/github/linguist into meganemura-replace-haml

This commit is contained in:
Brandon Black
2016-12-06 22:13:40 -08:00
15 changed files with 108 additions and 26 deletions

9
.gitmodules vendored
View File

@@ -325,9 +325,6 @@
[submodule "vendor/grammars/nemerle.tmbundle"]
path = vendor/grammars/nemerle.tmbundle
url = https://github.com/textmate/nemerle.tmbundle
[submodule "vendor/grammars/ninja.tmbundle"]
path = vendor/grammars/ninja.tmbundle
url = https://github.com/textmate/ninja.tmbundle
[submodule "vendor/grammars/objective-c.tmbundle"]
path = vendor/grammars/objective-c.tmbundle
url = https://github.com/textmate/objective-c.tmbundle
@@ -800,3 +797,9 @@
[submodule "vendor/grammars/language-haml"]
path = vendor/grammars/language-haml
url = https://github.com/ezekg/language-haml
[submodule "vendor/grammars/language-ninja"]
path = vendor/grammars/language-ninja
url = https://github.com/khyo/language-ninja
[submodule "vendor/grammars/language-fontforge"]
path = vendor/grammars/language-fontforge
url = https://github.com/Alhadis/language-fontforge

View File

@@ -362,6 +362,10 @@ vendor/grammars/language-csound:
- source.csound-score
vendor/grammars/language-emacs-lisp:
- source.emacs.lisp
vendor/grammars/language-fontforge:
- source.fontforge
- source.opentype
- text.sfd
vendor/grammars/language-gfm:
- source.gfm
vendor/grammars/language-graphql:
@@ -396,6 +400,8 @@ vendor/grammars/language-maxscript:
- source.maxscript
vendor/grammars/language-ncl:
- source.ncl
vendor/grammars/language-ninja:
- source.ninja
vendor/grammars/language-povray:
- source.pov-ray sdl
vendor/grammars/language-python:
@@ -477,8 +483,6 @@ vendor/grammars/nemerle.tmbundle:
- source.nemerle
vendor/grammars/nesC:
- source.nesc
vendor/grammars/ninja.tmbundle:
- source.ninja
vendor/grammars/nix:
- source.nix
vendor/grammars/nu.tmbundle:

View File

@@ -110,6 +110,12 @@ module Linguist
end
end
disambiguate ".cls" do |data|
if /\\\w+{/.match(data)
Language["TeX"]
end
end
disambiguate ".cs" do |data|
if /![\w\s]+methodsFor: /.match(data)
Language["Smalltalk"]

View File

@@ -1141,9 +1141,9 @@ Emacs Lisp:
- ".gnus"
- ".spacemacs"
- ".viper"
- "Project.ede"
- "_emacs"
- "abbrev_defs"
- Project.ede
- _emacs
- abbrev_defs
extensions:
- ".el"
- ".emacs"
@@ -1473,6 +1473,8 @@ Gnuplot:
Go:
type: programming
color: "#375eab"
aliases:
- golang
extensions:
- ".go"
ace_mode: golang
@@ -1962,6 +1964,8 @@ JSON5:
type: data
extensions:
- ".json5"
filenames:
- ".babelrc"
tm_scope: source.js
ace_mode: javascript
codemirror_mode: javascript
@@ -2956,6 +2960,15 @@ OpenSCAD:
- ".scad"
tm_scope: none
ace_mode: scad
language_id: 431
OpenType Feature File:
type: data
aliases:
- AFDKO
extensions:
- ".fea"
tm_scope: source.opentype
ace_mode: text
language_id: 266
Org:
type: prose
@@ -3175,7 +3188,7 @@ Perl6:
Pic:
type: markup
group: Groff
tm_scope: "source.pic"
tm_scope: source.pic
extensions:
- ".pic"
- ".chem"
@@ -4030,6 +4043,13 @@ SourcePawn:
- ".sma"
tm_scope: source.sp
ace_mode: text
language_id: 432
Spline Font Database:
type: data
extensions:
- ".sfd"
tm_scope: text.sfd
ace_mode: yaml
language_id: 354
Squirrel:
type: programming
@@ -4261,6 +4281,7 @@ Text:
- ".no"
filenames:
- COPYING
- FONTLOG
- INSTALL
- LICENSE
- NEWS

View File

@@ -50,6 +50,9 @@
# Go dependencies
- Godeps/_workspace/
# GNU indent profiles
- .indent.pro
# Minified JavaScript and CSS
- (\.|-)min\.(js|css)$

View File

@@ -0,0 +1,6 @@
{
"presets": [
"es2015",
"es2016"
]
}

View File

@@ -294,6 +294,8 @@ class TestFileBlob < Minitest::Test
assert !sample_blob("Godeps/Godeps.json").vendored?
assert sample_blob("Godeps/_workspace/src/github.com/kr/s3/sign.go").vendored?
assert sample_blob(".indent.pro").vendored?
# Rails vendor/
assert sample_blob("vendor/plugins/will_paginate/lib/will_paginate.rb").vendored?

View File

@@ -73,6 +73,15 @@ class TestHeuristcs < Minitest::Test
})
end
def test_cls_by_heuristics
assert_heuristics({
"TeX" => all_fixtures("TeX", "*.cls"),
nil => all_fixtures("Apex", "*.cls"),
nil => all_fixtures("OpenEdge ABL", "*.cls"),
nil => all_fixtures("Visual Basic", "*.cls"),
})
end
def test_cs_by_heuristics
assert_heuristics({
"C#" => all_fixtures("C#", "*.cs"),

1
vendor/README.md vendored
View File

@@ -224,7 +224,6 @@ This is a list of grammars that Linguist selects to provide syntax highlighting
- **NewLisp:** [textmate/lisp.tmbundle](https://github.com/textmate/lisp.tmbundle)
- **Nginx:** [brandonwamboldt/sublime-nginx](https://github.com/brandonwamboldt/sublime-nginx)
- **Nimrod:** [Varriount/NimLime](https://github.com/Varriount/NimLime)
- **Ninja:** [textmate/ninja.tmbundle](https://github.com/textmate/ninja.tmbundle)
- **Nit:** [R4PaSs/Sublime-Nit](https://github.com/R4PaSs/Sublime-Nit)
- **Nix:** [wmertens/sublime-nix](https://github.com/wmertens/sublime-nix)
- **NSIS:** [github-linguist/NSIS](https://github.com/github-linguist/NSIS)

View File

@@ -0,0 +1,18 @@
---
type: grammar
name: language-fontforge
license: isc
---
Copyright (c) 2016, John Gardner
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

View File

@@ -0,0 +1,25 @@
---
type: grammar
name: language-ninja
license: mit
---
Copyright (c) 2015 Kyle Howen
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -1,15 +0,0 @@
---
type: grammar
name: ninja.tmbundle
license: permissive
curated: true
---
If not otherwise specified (see below), files in this repository fall under the following license:
Permission to copy, use, modify, sell and distribute this
software is granted. This software is provided "as is" without
express or implied warranty, and with no claim as to its
suitability for any purpose.
An exception is made for files in readable text which contain their own license information, or files where an accompanying file exists (in the same directory) with a “-license” suffix added to the base-name name of the original file, and an extension of txt, html, or similar. For example “tidy” is accompanied by “tidy-license.txt”.