Skip to content

Commit

Permalink
Merge branch 'master' into add-cylc-language
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver-sanders committed Jun 12, 2024
2 parents eae3b98 + 42fd3c2 commit bb99a09
Show file tree
Hide file tree
Showing 165 changed files with 3,101 additions and 146 deletions.
27 changes: 24 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@
[submodule "vendor/grammars/LiveScript.tmbundle"]
path = vendor/grammars/LiveScript.tmbundle
url = https://github.com/paulmillr/LiveScript.tmbundle
[submodule "vendor/grammars/Luau.tmLanguage"]
path = vendor/grammars/Luau.tmLanguage
url = https://github.com/JohnnyMorganz/Luau.tmLanguage.git
[submodule "vendor/grammars/MATLAB-Language-grammar"]
path = vendor/grammars/MATLAB-Language-grammar
url = https://github.com/mathworks/MATLAB-Language-grammar
Expand Down Expand Up @@ -191,9 +194,6 @@
[submodule "vendor/grammars/TXL"]
path = vendor/grammars/TXL
url = https://github.com/MikeHoffert/Sublime-Text-TXL-syntax
[submodule "vendor/grammars/Terraform.tmLanguage"]
path = vendor/grammars/Terraform.tmLanguage
url = https://github.com/alexlouden/Terraform.tmLanguage
[submodule "vendor/grammars/Textmate-Gosu-Bundle"]
path = vendor/grammars/Textmate-Gosu-Bundle
url = https://github.com/jpcamara/Textmate-Gosu-Bundle
Expand Down Expand Up @@ -356,6 +356,9 @@
[submodule "vendor/grammars/boogie-vscode"]
path = vendor/grammars/boogie-vscode
url = https://github.com/boogie-org/boogie-vscode
[submodule "vendor/grammars/bqn-vscode"]
path = vendor/grammars/bqn-vscode
url = https://github.com/razetime/bqn-vscode.git
[submodule "vendor/grammars/browserslist-vscode"]
path = vendor/grammars/browserslist-vscode
url = https://github.com/browserslist/browserslist-vscode
Expand Down Expand Up @@ -401,6 +404,9 @@
[submodule "vendor/grammars/creole"]
path = vendor/grammars/creole
url = https://github.com/Siddley/Creole
[submodule "vendor/grammars/cron.tmbundle"]
path = vendor/grammars/cron.tmbundle
url = https://github.com/textmate/cron.tmbundle
[submodule "vendor/grammars/csharp-tmLanguage"]
path = vendor/grammars/csharp-tmLanguage
url = https://github.com/dotnet/csharp-tmLanguage
Expand Down Expand Up @@ -473,6 +479,9 @@
[submodule "vendor/grammars/fancy-tmbundle"]
path = vendor/grammars/fancy-tmbundle
url = https://github.com/fancy-lang/fancy-tmbundle
[submodule "vendor/grammars/firrtl-syntax"]
path = vendor/grammars/firrtl-syntax
url = https://github.com/chipsalliance/firrtl-syntax.git
[submodule "vendor/grammars/fish-tmbundle"]
path = vendor/grammars/fish-tmbundle
url = https://github.com/l15n/fish-tmbundle
Expand Down Expand Up @@ -971,6 +980,9 @@
[submodule "vendor/grammars/pike-textmate"]
path = vendor/grammars/pike-textmate
url = https://github.com/hww3/pike-textmate
[submodule "vendor/grammars/pkl.tmbundle"]
path = vendor/grammars/pkl.tmbundle
url = https://github.com/apple/pkl.tmbundle.git
[submodule "vendor/grammars/polar-grammar"]
path = vendor/grammars/polar-grammar
url = https://github.com/osohq/polar-grammar.git
Expand Down Expand Up @@ -1190,6 +1202,9 @@
[submodule "vendor/grammars/tcl.tmbundle"]
path = vendor/grammars/tcl.tmbundle
url = https://github.com/textmate/tcl.tmbundle
[submodule "vendor/grammars/templ-vscode"]
path = vendor/grammars/templ-vscode
url = https://github.com/templ-go/templ-vscode.git
[submodule "vendor/grammars/textmate.tmbundle"]
path = vendor/grammars/textmate.tmbundle
url = https://github.com/textmate/textmate.tmbundle
Expand Down Expand Up @@ -1235,6 +1250,9 @@
[submodule "vendor/grammars/vscode-brightscript-language"]
path = vendor/grammars/vscode-brightscript-language
url = https://github.com/rokucommunity/vscode-brightscript-language.git
[submodule "vendor/grammars/vscode-caddyfile"]
path = vendor/grammars/vscode-caddyfile
url = https://github.com/caddyserver/vscode-caddyfile.git
[submodule "vendor/grammars/vscode-cadence"]
path = vendor/grammars/vscode-cadence
url = https://github.com/onflow/vscode-cadence.git
Expand Down Expand Up @@ -1323,6 +1341,9 @@
[submodule "vendor/grammars/vscode-rbs-syntax"]
path = vendor/grammars/vscode-rbs-syntax
url = https://github.com/soutaro/vscode-rbs-syntax.git
[submodule "vendor/grammars/vscode-ron"]
path = vendor/grammars/vscode-ron
url = https://github.com/a5huynh/vscode-ron.git
[submodule "vendor/grammars/vscode-scala-syntax"]
path = vendor/grammars/vscode-scala-syntax
url = https://github.com/scala/vscode-scala-syntax
Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ end
# The error count will need to be adjusted here until such time as all grammars are 100% error free.
desc "Check that compiling the grammars doesn't introduce any new unexpected errors"
task :check_grammars do
expected_error_count = 63 # This count should only ever go down. If it goes up, there's a new issue that needs to be addressed before updating the grammar.
expected_error_count = 41 # This count should only ever go down. If it goes up, there's a new issue that needs to be addressed before updating the grammar.
rm_rf "linguist-grammars"
output, status = Open3.capture2e("script/grammar-compiler", "compile", "-o", "linguist-grammars")
errors_found = output[/The grammar library contains ([0-9]+) errors/, 1].to_i
Expand Down
23 changes: 20 additions & 3 deletions grammars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ vendor/grammars/Ligo-grammar:
- source.religo
vendor/grammars/LiveScript.tmbundle:
- source.livescript
vendor/grammars/Luau.tmLanguage:
- source.luau
vendor/grammars/MATLAB-Language-grammar:
- source.matlab
vendor/grammars/MQL5-sublime:
Expand Down Expand Up @@ -160,8 +162,6 @@ vendor/grammars/TLA:
- source.tla
vendor/grammars/TXL:
- source.txl
vendor/grammars/Terraform.tmLanguage:
- source.terraform
vendor/grammars/Textmate-Gosu-Bundle:
- source.gosu.2
vendor/grammars/TypeScript-TmLanguage:
Expand Down Expand Up @@ -292,6 +292,8 @@ vendor/grammars/blitzmax:
- source.blitzmax
vendor/grammars/boogie-vscode:
- source.boogie
vendor/grammars/bqn-vscode:
- source.bqn
vendor/grammars/browserslist-vscode:
- text.browserslist
vendor/grammars/c.tmbundle:
Expand Down Expand Up @@ -327,6 +329,8 @@ vendor/grammars/cpp-qt.tmbundle:
- source.qmake
vendor/grammars/creole:
- text.html.creole
vendor/grammars/cron.tmbundle:
- text.crontab
vendor/grammars/csharp-tmLanguage:
- source.cs
vendor/grammars/cucumber-tmbundle:
Expand Down Expand Up @@ -387,6 +391,8 @@ vendor/grammars/factor:
- text.html.factor
vendor/grammars/fancy-tmbundle:
- source.fancy
vendor/grammars/firrtl-syntax:
- source.firrtl
vendor/grammars/fish-tmbundle:
- source.fish
vendor/grammars/forth:
Expand Down Expand Up @@ -419,7 +425,6 @@ vendor/grammars/graphiql:
- inline.graphql.markdown.codeblock
- inline.graphql.php
- inline.graphql.python
- inline.graphql.rb
- inline.graphql.re
- inline.graphql.res
- inline.graphql.scala
Expand Down Expand Up @@ -901,6 +906,8 @@ vendor/grammars/pig-latin:
- source.pig_latin
vendor/grammars/pike-textmate:
- source.pike
vendor/grammars/pkl.tmbundle:
- source.pkl
vendor/grammars/polar-grammar:
- source.polar
vendor/grammars/portugol-grammar:
Expand Down Expand Up @@ -1068,6 +1075,8 @@ vendor/grammars/syntax:
vendor/grammars/tcl.tmbundle:
- source.tcl
- text.html.tcl
vendor/grammars/templ-vscode:
- source.templ
vendor/grammars/textmate.tmbundle:
- source.regexp.oniguruma
- source.tm-properties
Expand Down Expand Up @@ -1108,6 +1117,10 @@ vendor/grammars/vscode-bitbake:
- source.bb
vendor/grammars/vscode-brightscript-language:
- source.brs
vendor/grammars/vscode-caddyfile:
- source.Caddyfile
- source.Caddyfile-test
- source.markdown.caddy.codeblock
vendor/grammars/vscode-cadence:
- markdown.cadence.codeblock
- source.cadence
Expand All @@ -1128,6 +1141,7 @@ vendor/grammars/vscode-gcode-syntax:
vendor/grammars/vscode-gedcom:
- source.gedcom
vendor/grammars/vscode-gleam:
- markdown.gleam.codeblock
- source.gleam
vendor/grammars/vscode-go:
- go.mod
Expand Down Expand Up @@ -1174,6 +1188,7 @@ vendor/grammars/vscode-move-syntax:
- mdx.LANGUAGE.codeblock
- source.move
vendor/grammars/vscode-opa:
- markdown.rego.codeblock
- source.rego
vendor/grammars/vscode-pddl:
- source.pddl
Expand All @@ -1196,6 +1211,8 @@ vendor/grammars/vscode-python:
- source.pip-requirements
vendor/grammars/vscode-rbs-syntax:
- source.rbs
vendor/grammars/vscode-ron:
- source.ron
vendor/grammars/vscode-scala-syntax:
- source.scala
vendor/grammars/vscode-singularity:
Expand Down
2 changes: 1 addition & 1 deletion lib/linguist/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.29.0
7.30.0
16 changes: 16 additions & 0 deletions lib/linguist/generated.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ def generated?
generated_net_specflow_feature_file? ||
composer_lock? ||
cargo_lock? ||
cargo_orig? ||
flake_lock? ||
bazel_lock? ||
node_modules? ||
go_vendor? ||
go_lock? ||
Expand Down Expand Up @@ -477,13 +479,27 @@ def cargo_lock?
!!name.match(/Cargo\.lock/)
end

# Internal: Is the blob a generated Rust Cargo original file?
#
# Returns true or false.
def cargo_orig?
!!name.match(/Cargo\.toml\.orig/)
end

# Internal: Is the blob a generated Nix flakes lock file?
#
# Returns true or false
def flake_lock?
!!name.match(/(^|\/)flake\.lock$/)
end

# Internal: Is the blob a Bazel generated bzlmod lockfile?
#
# Returns true or false
def bazel_lock?
!!name.match(/(^|\/)MODULE\.bazel\.lock$/)
end

# Is the blob a VCR Cassette file?
#
# Returns true or false
Expand Down
9 changes: 9 additions & 0 deletions lib/linguist/heuristics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,8 @@ disambiguations:
rules:
- language: XML
pattern: '<!ENTITY '
- language: NMODL
pattern: '\b(NEURON|INITIAL|UNITS)\b'
- language: Modula-2
pattern: '^\s*(?i:MODULE|END) [\w\.]+;'
- language: [Linux Kernel Module, AMPL]
Expand Down Expand Up @@ -530,6 +532,13 @@ disambiguations:
pattern: '<\?hh'
- language: PHP
pattern: '<\?[^h]'
- extensions: ['.pkl']
rules:
- language: Pkl
pattern:
- '^\s*(module|import|amends|extends|local|const|fixed|abstract|open|class|typealias|@\w+)\b'
- '^\s*[a-zA-Z0-9_$]+\s*(=|{|:)|^\s*`[^`]+`\s*(=|{|:)|for\s*\(|when\s*\('
- language: Pickle
- extensions: ['.pl']
rules:
- language: Prolog
Expand Down
Loading

0 comments on commit bb99a09

Please sign in to comment.