github-linguist 7.24.0 → 7.25.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/grammars/govulncheck.json +1 -0
- data/grammars/liquid.injection.json +1 -1
- data/grammars/source.abap.json +1 -1
- data/grammars/source.abl.json +1 -1
- data/grammars/source.arr.json +1 -0
- data/grammars/source.astro.json +1 -1
- data/grammars/source.ats.json +1 -1
- data/grammars/source.basic.json +1 -1
- data/grammars/source.brs.json +1 -1
- data/grammars/source.cds.json +1 -1
- data/grammars/source.chapel.json +1 -1
- data/grammars/source.circom.json +1 -0
- data/grammars/source.clar.json +1 -1
- data/grammars/source.cobol.json +1 -1
- data/grammars/source.curlrc.json +1 -1
- data/grammars/source.dart.json +1 -1
- data/grammars/source.denizenscript.json +1 -1
- data/grammars/source.editorconfig.json +1 -1
- data/grammars/source.gdscript.json +1 -1
- data/grammars/source.generic-config.json +1 -0
- data/grammars/source.gitconfig.json +1 -1
- data/grammars/source.gleam.json +1 -1
- data/grammars/source.graphql.json +1 -1
- data/grammars/source.hocon.json +1 -1
- data/grammars/source.hosts.json +1 -1
- data/grammars/source.j.json +1 -1
- data/grammars/source.jflex.json +1 -1
- data/grammars/source.kerboscript.json +1 -0
- data/grammars/source.kickstart.json +1 -0
- data/grammars/source.kotlin.json +1 -1
- data/grammars/source.m2.json +1 -1
- data/grammars/source.mermaid.flowchart.json +1 -1
- data/grammars/source.mermaid.json +1 -1
- data/grammars/source.mermaid.mindmap.json +1 -0
- data/grammars/source.mo.json +1 -1
- data/grammars/source.move.json +1 -1
- data/grammars/source.nim.json +1 -1
- data/grammars/source.nim_filter.json +1 -1
- data/grammars/source.nimcfg.json +1 -1
- data/grammars/source.pnlgrp.json +1 -1
- data/grammars/source.polar.json +1 -1
- data/grammars/source.postscript.json +1 -1
- data/grammars/source.prisma.json +1 -1
- data/grammars/source.rescript.json +1 -1
- data/grammars/source.rpgle.json +1 -1
- data/grammars/source.rust.json +1 -1
- data/grammars/source.scala.json +1 -1
- data/grammars/source.singularity.json +1 -1
- data/grammars/source.sqf.json +1 -1
- data/grammars/source.stan.json +1 -1
- data/grammars/source.svelte.json +1 -1
- data/grammars/source.sway.json +1 -0
- data/grammars/source.talon.json +1 -1
- data/grammars/source.ts.json +1 -1
- data/grammars/source.tsql.json +1 -1
- data/grammars/source.tsx.json +1 -1
- data/grammars/source.turtle.json +1 -1
- data/grammars/source.v.json +1 -1
- data/grammars/source.yara.json +1 -1
- data/grammars/text.adblock.json +1 -1
- data/grammars/text.checksums.json +1 -1
- data/grammars/text.html.liquid.json +1 -1
- data/grammars/text.restructuredtext.json +1 -1
- data/grammars/text.sfd.json +1 -1
- data/grammars/text.xml.svg.json +1 -1
- data/grammars/version +1 -1
- data/lib/linguist/VERSION +1 -1
- data/lib/linguist/generated.rb +8 -0
- data/lib/linguist/generic.yml +1 -0
- data/lib/linguist/heuristics.yml +38 -13
- data/lib/linguist/languages.json +1 -1
- data/lib/linguist/languages.yml +132 -16
- data/lib/linguist/samples.json +1 -1
- data/lib/linguist/vendor.yml +3 -0
- metadata +11 -4
- data/grammars/source.nim.comment.json +0 -1
data/lib/linguist/heuristics.yml
CHANGED
@@ -1,23 +1,23 @@
|
|
1
1
|
# A collection of simple regexp-based rules that can be applied to content
|
2
2
|
# to disambiguate languages with the same file extension.
|
3
3
|
#
|
4
|
-
# There two top-level keys: disambiguations and named_patterns.
|
4
|
+
# There are two top-level keys: disambiguations and named_patterns.
|
5
5
|
#
|
6
6
|
# disambiguations - a list of disambiguation rules, one for each
|
7
7
|
# extension or group of extensions.
|
8
8
|
# extensions - an array of file extensions that this block applies to.
|
9
9
|
# rules - list of rules that are applied in order to the content
|
10
|
-
# of a file with matching extension. Rules are evaluated
|
10
|
+
# of a file with a matching extension. Rules are evaluated
|
11
11
|
# until one of them matches. If none matches, no language
|
12
12
|
# is returned.
|
13
13
|
# language - Language to be returned if the rule matches.
|
14
14
|
# pattern - Ruby-compatible regular expression that makes the rule
|
15
|
-
# match. If no pattern is specified, the rule always
|
15
|
+
# match. If no pattern is specified, the rule always matches.
|
16
16
|
# Pattern can be a string with a single regular expression
|
17
17
|
# or an array of strings that will be merged in a single
|
18
18
|
# regular expression (with union).
|
19
19
|
# and - An and block merges multiple rules and checks that all of
|
20
|
-
#
|
20
|
+
# them must match.
|
21
21
|
# negative_pattern - Same as pattern, but checks for absence of matches.
|
22
22
|
# named_pattern - A pattern can be reused by specifying it in the
|
23
23
|
# named_patterns section and referencing it here by its
|
@@ -58,9 +58,13 @@ disambiguations:
|
|
58
58
|
# AL pattern source from https://github.com/microsoft/AL/blob/master/grammar/alsyntax.tmlanguage - keyword.other.applicationobject.al
|
59
59
|
- language: AL
|
60
60
|
and:
|
61
|
-
- pattern: '\b(?i:(CODEUNIT|PAGE|PAGEEXTENSION|PAGECUSTOMIZATION|DOTNET|ENUM|ENUMEXTENSION|VALUE|QUERY|REPORT|TABLE|TABLEEXTENSION|XMLPORT|PROFILE|CONTROLADDIN))\b'
|
61
|
+
- pattern: '\b(?i:(CODEUNIT|PAGE|PAGEEXTENSION|PAGECUSTOMIZATION|DOTNET|ENUM|ENUMEXTENSION|VALUE|QUERY|REPORT|TABLE|TABLEEXTENSION|XMLPORT|PROFILE|CONTROLADDIN|REPORTEXTENSION|INTERFACE|PERMISSIONSET|PERMISSIONSETEXTENSION|ENTITLEMENT))\b'
|
62
62
|
# Open-ended fallback to Perl AutoLoader
|
63
63
|
- language: Perl
|
64
|
+
- extensions: ['.app']
|
65
|
+
rules:
|
66
|
+
- language: Erlang
|
67
|
+
pattern: '(?m)^{\s*(?:application|''application'')\s*,\s*(?:[a-z]+[\w@]*|''[^'']+'')\s*,\s*\[.*?\]\s*}\.[ \t]*$'
|
64
68
|
- extensions: ['.as']
|
65
69
|
rules:
|
66
70
|
- language: ActionScript
|
@@ -87,7 +91,7 @@ disambiguations:
|
|
87
91
|
- language: FreeBasic
|
88
92
|
pattern: '^[ \t]*#(?:define|endif|endmacro|ifn?def|if|include|lang|macro)\s'
|
89
93
|
- language: BASIC
|
90
|
-
pattern: '^\s*\d+'
|
94
|
+
pattern: '^\A\s*\d+'
|
91
95
|
- extensions: ['.bb']
|
92
96
|
rules:
|
93
97
|
- language: BlitzBasic
|
@@ -498,20 +502,28 @@ disambiguations:
|
|
498
502
|
- language: Prolog
|
499
503
|
pattern: '^[^#]*:-'
|
500
504
|
- language: Perl
|
501
|
-
|
505
|
+
and:
|
506
|
+
- negative_pattern: '^\s*use\s+v6\b'
|
507
|
+
- named_pattern: perl
|
502
508
|
- language: Raku
|
503
|
-
named_pattern:
|
509
|
+
named_pattern: raku
|
504
510
|
- extensions: ['.plist']
|
505
511
|
rules:
|
506
512
|
- language: XML Property List
|
507
513
|
pattern: '^\s*(?:<\?xml\s|<!DOCTYPE\s+plist|<plist(?:\s+version\s*=\s*(["''])\d+(?:\.\d+)?\1)?\s*>\s*$)'
|
508
514
|
- language: OpenStep Property List
|
515
|
+
- extensions: ['.plt']
|
516
|
+
rules:
|
517
|
+
- language: Prolog
|
518
|
+
pattern: '^\s*:-'
|
509
519
|
- extensions: ['.pm']
|
510
520
|
rules:
|
511
521
|
- language: Perl
|
512
|
-
|
522
|
+
and:
|
523
|
+
- negative_pattern: '^\s*use\s+v6\b'
|
524
|
+
- named_pattern: perl
|
513
525
|
- language: Raku
|
514
|
-
named_pattern:
|
526
|
+
named_pattern: raku
|
515
527
|
- language: X PixMap
|
516
528
|
pattern: '^\s*\/\* XPM \*\/'
|
517
529
|
- extensions: ['.pod']
|
@@ -664,10 +676,18 @@ disambiguations:
|
|
664
676
|
rules:
|
665
677
|
- language: STL
|
666
678
|
pattern: '\A\s*solid(?=$|\s)(?m:.*?)\Rendsolid(?:$|\s)'
|
679
|
+
- extensions: ['.sw']
|
680
|
+
rules:
|
681
|
+
- language: Sway
|
682
|
+
pattern: '^\s*(?:(?:abi|dep|fn|impl|mod|pub|trait)\s|#\[)'
|
683
|
+
- language: XML
|
684
|
+
pattern: '^\s*<\?xml\s+version'
|
667
685
|
- extensions: ['.t']
|
668
686
|
rules:
|
669
687
|
- language: Perl
|
670
|
-
|
688
|
+
and:
|
689
|
+
- negative_pattern: '^\s*use\s+v6\b'
|
690
|
+
- named_pattern: perl
|
671
691
|
- language: Raku
|
672
692
|
pattern: '^\s*(?:use\s+v6\b|\bmodule\b|\bmy\s+class\b)'
|
673
693
|
- language: Turing
|
@@ -811,7 +831,12 @@ named_patterns:
|
|
811
831
|
mdoc-heading: '^[.''][ \t]*Sh +(?:[^"\s]|"[^"]+")'
|
812
832
|
mdoc-title: '^[.''][ \t]*Dt +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)'
|
813
833
|
objectivec: '^\s*(@(interface|class|protocol|property|end|synchronised|selector|implementation)\b|#import\s+.+\.h[">])'
|
814
|
-
|
815
|
-
|
834
|
+
perl:
|
835
|
+
- '\buse\s+(?:strict\b|v?5\b)'
|
836
|
+
- '^\s*use\s+(?:constant|overload)\b'
|
837
|
+
- '^\s*(?:\*|(?:our\s*)?@)EXPORT\s*='
|
838
|
+
- '^\s*package\s+[^\W\d]\w*(?:::\w+)*\s*(?:[;{]|\sv?\d)'
|
839
|
+
- '[\s$][^\W\d]\w*(?::\w+)*->[a-zA-Z_\[({]'
|
840
|
+
raku: '^\s*(?:use\s+v6\b|\bmodule\b|\b(?:my\s+)?class\b)'
|
816
841
|
vb-class: '^\s*VERSION\s+[0-9]\.[0-9]\s+CLASS'
|
817
842
|
vb-form: '^\s*VERSION\s+[0-9]\.[0-9]{2}'
|