mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-12-29 13:21:01 +00:00
Merge branch 'master' into licensee
This commit is contained in:
12
.gitmodules
vendored
12
.gitmodules
vendored
@@ -169,9 +169,6 @@
|
|||||||
[submodule "vendor/grammars/sublime-idris"]
|
[submodule "vendor/grammars/sublime-idris"]
|
||||||
path = vendor/grammars/sublime-idris
|
path = vendor/grammars/sublime-idris
|
||||||
url = https://github.com/laughedelic/sublime-idris
|
url = https://github.com/laughedelic/sublime-idris
|
||||||
[submodule "vendor/grammars/sublime-better-typescript"]
|
|
||||||
path = vendor/grammars/sublime-better-typescript
|
|
||||||
url = https://github.com/lavrton/sublime-better-typescript
|
|
||||||
[submodule "vendor/grammars/moonscript-tmbundle"]
|
[submodule "vendor/grammars/moonscript-tmbundle"]
|
||||||
path = vendor/grammars/moonscript-tmbundle
|
path = vendor/grammars/moonscript-tmbundle
|
||||||
url = https://github.com/leafo/moonscript-tmbundle
|
url = https://github.com/leafo/moonscript-tmbundle
|
||||||
@@ -397,9 +394,6 @@
|
|||||||
[submodule "vendor/grammars/processing.tmbundle"]
|
[submodule "vendor/grammars/processing.tmbundle"]
|
||||||
path = vendor/grammars/processing.tmbundle
|
path = vendor/grammars/processing.tmbundle
|
||||||
url = https://github.com/textmate/processing.tmbundle
|
url = https://github.com/textmate/processing.tmbundle
|
||||||
[submodule "vendor/grammars/prolog.tmbundle"]
|
|
||||||
path = vendor/grammars/prolog.tmbundle
|
|
||||||
url = https://github.com/textmate/prolog.tmbundle
|
|
||||||
[submodule "vendor/grammars/python-django.tmbundle"]
|
[submodule "vendor/grammars/python-django.tmbundle"]
|
||||||
path = vendor/grammars/python-django.tmbundle
|
path = vendor/grammars/python-django.tmbundle
|
||||||
url = https://github.com/textmate/python-django.tmbundle
|
url = https://github.com/textmate/python-django.tmbundle
|
||||||
@@ -671,6 +665,12 @@
|
|||||||
[submodule "vendor/grammars/st2-zonefile"]
|
[submodule "vendor/grammars/st2-zonefile"]
|
||||||
path = vendor/grammars/st2-zonefile
|
path = vendor/grammars/st2-zonefile
|
||||||
url = https://github.com/sixty4k/st2-zonefile
|
url = https://github.com/sixty4k/st2-zonefile
|
||||||
|
[submodule "vendor/grammars/sublimeprolog"]
|
||||||
|
path = vendor/grammars/sublimeprolog
|
||||||
|
url = https://github.com/alnkpa/sublimeprolog
|
||||||
[submodule "vendor/grammars/sublime-aspectj"]
|
[submodule "vendor/grammars/sublime-aspectj"]
|
||||||
path = vendor/grammars/sublime-aspectj
|
path = vendor/grammars/sublime-aspectj
|
||||||
url = https://github.com/pchaigno/sublime-aspectj
|
url = https://github.com/pchaigno/sublime-aspectj
|
||||||
|
[submodule "vendor/grammars/sublime-typescript"]
|
||||||
|
path = vendor/grammars/sublime-typescript
|
||||||
|
url = https://github.com/Microsoft/TypeScript-Sublime-Plugin
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ See [Troubleshooting](#troubleshooting) and [`CONTRIBUTING.md`](/CONTRIBUTING.md
|
|||||||
The Language stats bar is built by aggregating the languages of each file in that repository. If it is reporting a language that you don't expect:
|
The Language stats bar is built by aggregating the languages of each file in that repository. If it is reporting a language that you don't expect:
|
||||||
|
|
||||||
0. Click on the name of the language in the stats bar to see a list of the files that are identified as that language.
|
0. Click on the name of the language in the stats bar to see a list of the files that are identified as that language.
|
||||||
0. If you see files that you didn't write, consider moving the files into one of the [paths for vendored code](https://github.com/github/linguist/blob/master/lib/linguist/vendor.yml), or use the [manual overrides](#overrides) feature to ignore them.
|
0. If you see files that you didn't write, consider moving the files into one of the [paths for vendored code](/lib/linguist/vendor.yml), or use the [manual overrides](#overrides) feature to ignore them.
|
||||||
0. If the files are being misclassified, search for [open issues][issues] to see if anyone else has already reported the issue. Any information you an add, especially links to public repositories, is helpful.
|
0. If the files are being misclassified, search for [open issues][issues] to see if anyone else has already reported the issue. Any information you an add, especially links to public repositories, is helpful.
|
||||||
0. If there are no reported issues of this misclassification, [open an issue][new-issue] and include a link to the repository or a sample of the code that is being misclassified.
|
0. If there are no reported issues of this misclassification, [open an issue][new-issue] and include a link to the repository or a sample of the code that is being misclassified.
|
||||||
|
|
||||||
|
|||||||
10
grammars.yml
10
grammars.yml
@@ -432,8 +432,6 @@ vendor/grammars/powershell:
|
|||||||
- source.powershell
|
- source.powershell
|
||||||
vendor/grammars/processing.tmbundle:
|
vendor/grammars/processing.tmbundle:
|
||||||
- source.processing
|
- source.processing
|
||||||
vendor/grammars/prolog.tmbundle:
|
|
||||||
- source.prolog
|
|
||||||
vendor/grammars/protobuf-tmbundle:
|
vendor/grammars/protobuf-tmbundle:
|
||||||
- source.protobuf
|
- source.protobuf
|
||||||
vendor/grammars/puppet-textmate-bundle:
|
vendor/grammars/puppet-textmate-bundle:
|
||||||
@@ -484,8 +482,6 @@ vendor/grammars/sublime-aspectj/:
|
|||||||
- source.aspectj
|
- source.aspectj
|
||||||
vendor/grammars/sublime-befunge:
|
vendor/grammars/sublime-befunge:
|
||||||
- source.befunge
|
- source.befunge
|
||||||
vendor/grammars/sublime-better-typescript:
|
|
||||||
- source.ts
|
|
||||||
vendor/grammars/sublime-bsv:
|
vendor/grammars/sublime-bsv:
|
||||||
- source.bsv
|
- source.bsv
|
||||||
vendor/grammars/sublime-cirru:
|
vendor/grammars/sublime-cirru:
|
||||||
@@ -524,6 +520,9 @@ vendor/grammars/sublime-text-ox/:
|
|||||||
- source.ox
|
- source.ox
|
||||||
vendor/grammars/sublime-text-pig-latin/:
|
vendor/grammars/sublime-text-pig-latin/:
|
||||||
- source.pig_latin
|
- source.pig_latin
|
||||||
|
vendor/grammars/sublime-typescript/:
|
||||||
|
- source.ts
|
||||||
|
- source.tsx
|
||||||
vendor/grammars/sublime-varnish:
|
vendor/grammars/sublime-varnish:
|
||||||
- source.varnish.vcl
|
- source.varnish.vcl
|
||||||
vendor/grammars/sublime_cobol:
|
vendor/grammars/sublime_cobol:
|
||||||
@@ -534,6 +533,9 @@ vendor/grammars/sublime_cobol:
|
|||||||
vendor/grammars/sublime_man_page_support:
|
vendor/grammars/sublime_man_page_support:
|
||||||
- source.man
|
- source.man
|
||||||
- text.groff
|
- text.groff
|
||||||
|
vendor/grammars/sublimeprolog/:
|
||||||
|
- source.prolog
|
||||||
|
- source.prolog.eclipse
|
||||||
vendor/grammars/sublimetext-cuda-cpp:
|
vendor/grammars/sublimetext-cuda-cpp:
|
||||||
- source.cuda-c++
|
- source.cuda-c++
|
||||||
vendor/grammars/swift.tmbundle:
|
vendor/grammars/swift.tmbundle:
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ module Linguist
|
|||||||
#
|
#
|
||||||
# Examples
|
# Examples
|
||||||
#
|
#
|
||||||
# disambiguate "Perl", "Prolog" do |data|
|
# disambiguate ".pm" do |data|
|
||||||
# if data.include?("use strict")
|
# if data.include?("use strict")
|
||||||
# Language["Perl"]
|
# Language["Perl"]
|
||||||
# elsif /^[^#]+:-/.match(data)
|
# elsif /^[^#]+:-/.match(data)
|
||||||
@@ -102,7 +102,7 @@ module Linguist
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
disambiguate ".pm" do |data|
|
disambiguate ".pm", ".t" do |data|
|
||||||
if /^(use v6|(my )?class|module)/.match(data)
|
if /^(use v6|(my )?class|module)/.match(data)
|
||||||
Language["Perl6"]
|
Language["Perl6"]
|
||||||
elsif /use strict|use\s+v?5\./.match(data)
|
elsif /use strict|use\s+v?5\./.match(data)
|
||||||
@@ -112,7 +112,7 @@ module Linguist
|
|||||||
|
|
||||||
disambiguate ".ecl" do |data|
|
disambiguate ".ecl" do |data|
|
||||||
if /^[^#]+:-/.match(data)
|
if /^[^#]+:-/.match(data)
|
||||||
Language["Prolog"]
|
Language["ECLiPSe"]
|
||||||
elsif data.include?(":=")
|
elsif data.include?(":=")
|
||||||
Language["ECL"]
|
Language["ECL"]
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -843,6 +843,14 @@ ECL:
|
|||||||
tm_scope: none
|
tm_scope: none
|
||||||
ace_mode: text
|
ace_mode: text
|
||||||
|
|
||||||
|
ECLiPSe:
|
||||||
|
type: programming
|
||||||
|
group: prolog
|
||||||
|
extensions:
|
||||||
|
- .ecl
|
||||||
|
tm_scope: source.prolog.eclipse
|
||||||
|
ace_mode: prolog
|
||||||
|
|
||||||
Eagle:
|
Eagle:
|
||||||
type: markup
|
type: markup
|
||||||
color: "#814C05"
|
color: "#814C05"
|
||||||
@@ -2628,11 +2636,11 @@ Prolog:
|
|||||||
color: "#74283c"
|
color: "#74283c"
|
||||||
extensions:
|
extensions:
|
||||||
- .pl
|
- .pl
|
||||||
- .ecl
|
|
||||||
- .pro
|
- .pro
|
||||||
- .prolog
|
- .prolog
|
||||||
interpreters:
|
interpreters:
|
||||||
- swipl
|
- swipl
|
||||||
|
tm_scope: source.prolog
|
||||||
ace_mode: prolog
|
ace_mode: prolog
|
||||||
|
|
||||||
Propeller Spin:
|
Propeller Spin:
|
||||||
@@ -2813,7 +2821,7 @@ RMarkdown:
|
|||||||
ace_mode: markdown
|
ace_mode: markdown
|
||||||
extensions:
|
extensions:
|
||||||
- .rmd
|
- .rmd
|
||||||
tm_scope: none
|
tm_scope: source.gfm
|
||||||
|
|
||||||
Racket:
|
Racket:
|
||||||
type: programming
|
type: programming
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ class TestGrammars < Minitest::Test
|
|||||||
gpl-3.0
|
gpl-3.0
|
||||||
lgpl-3.0
|
lgpl-3.0
|
||||||
mit
|
mit
|
||||||
|
mpl-2.0
|
||||||
textmate
|
textmate
|
||||||
unlicense
|
unlicense
|
||||||
wtfpl
|
wtfpl
|
||||||
|
|||||||
@@ -66,11 +66,21 @@ class TestHeuristcs < Minitest::Test
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
# Candidate languages = ["ECL", "Prolog"]
|
# Candidate languages = ["Perl", "Perl6"]
|
||||||
def test_ecl_prolog_by_heuristics
|
def test_t_perl_by_heuristics
|
||||||
|
assert_heuristics({
|
||||||
|
"Perl" => all_fixtures("Perl", "*.t"),
|
||||||
|
"Perl6" => ["Perl6/01-dash-uppercase-i.t", "Perl6/01-parse.t", "Perl6/advent2009-day16.t",
|
||||||
|
"Perl6/basic-open.t", "Perl6/calendar.t", "Perl6/for.t", "Perl6/hash.t",
|
||||||
|
"Perl6/listquote-whitespace.t"]
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
# Candidate languages = ["ECL", "ECLiPSe"]
|
||||||
|
def test_ecl_by_heuristics
|
||||||
assert_heuristics({
|
assert_heuristics({
|
||||||
"ECL" => all_fixtures("ECL", "*.ecl"),
|
"ECL" => all_fixtures("ECL", "*.ecl"),
|
||||||
"Prolog" => all_fixtures("Prolog", "*.ecl")
|
"ECLiPSe" => all_fixtures("ECLiPSe", "*.ecl")
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
1
vendor/grammars/sublime-typescript
vendored
Submodule
1
vendor/grammars/sublime-typescript
vendored
Submodule
Submodule vendor/grammars/sublime-typescript added at 0d519e5a55
1
vendor/grammars/sublimeprolog
vendored
Submodule
1
vendor/grammars/sublimeprolog
vendored
Submodule
Submodule vendor/grammars/sublimeprolog added at 9fd46df4b6
Reference in New Issue
Block a user