github-linguist 7.30.0 → 8.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/grammars/inline.edgeql.json +1 -1
  3. data/grammars/inline.peggy.json +1 -0
  4. data/grammars/markdown.move.codeblock.json +1 -1
  5. data/grammars/mdx.move.codeblock.json +1 -0
  6. data/grammars/source.abl.json +1 -1
  7. data/grammars/source.bicep.json +1 -1
  8. data/grammars/source.cairo.json +1 -1
  9. data/grammars/source.cairo0.json +1 -0
  10. data/grammars/source.cl.json +1 -1
  11. data/grammars/source.clar.json +1 -1
  12. data/grammars/source.clarion.json +1 -1
  13. data/grammars/source.cmd.json +1 -1
  14. data/grammars/source.commonlisp.json +1 -1
  15. data/grammars/source.cs.json +1 -1
  16. data/grammars/source.curlrc.json +1 -1
  17. data/grammars/source.curry.json +1 -1
  18. data/grammars/source.cylc.json +1 -0
  19. data/grammars/source.dart.json +1 -1
  20. data/grammars/source.dds.dspf.json +1 -1
  21. data/grammars/source.dds.icff.json +1 -1
  22. data/grammars/source.dds.lf.json +1 -1
  23. data/grammars/source.dds.pf.json +1 -1
  24. data/grammars/source.dds.prtf.json +1 -1
  25. data/grammars/source.dune.json +1 -0
  26. data/grammars/source.elvish.json +1 -1
  27. data/grammars/source.fsharp.json +1 -1
  28. data/grammars/source.gdscript.json +1 -1
  29. data/grammars/source.gitconfig.json +1 -1
  30. data/grammars/source.gleam.json +1 -1
  31. data/grammars/source.hgignore.json +1 -1
  32. data/grammars/source.hosts.json +1 -1
  33. data/grammars/source.iCalendar.json +1 -0
  34. data/grammars/source.ice.json +1 -1
  35. data/grammars/source.julia.json +1 -1
  36. data/grammars/source.just.json +1 -1
  37. data/grammars/source.lcb.json +1 -0
  38. data/grammars/source.lilypond.json +1 -1
  39. data/grammars/source.livecodescript.json +1 -0
  40. data/grammars/source.luau.json +1 -1
  41. data/grammars/source.matlab.json +1 -1
  42. data/grammars/source.mcfunction.json +1 -1
  43. data/grammars/source.mdx.json +1 -1
  44. data/grammars/source.mo.json +1 -1
  45. data/grammars/source.move.json +1 -1
  46. data/grammars/source.nanorc.json +1 -1
  47. data/grammars/source.nr.json +1 -0
  48. data/grammars/source.p4.json +1 -1
  49. data/grammars/source.peggy.json +1 -0
  50. data/grammars/source.polar.json +1 -1
  51. data/grammars/source.powerbuilder.json +1 -0
  52. data/grammars/source.qsharp.json +1 -1
  53. data/grammars/source.rpgle.json +1 -1
  54. data/grammars/source.rust.json +1 -1
  55. data/grammars/source.sentinel.json +1 -1
  56. data/grammars/source.sourcepawn.json +1 -1
  57. data/grammars/source.stan.json +1 -1
  58. data/grammars/source.swift.json +1 -1
  59. data/grammars/source.sy.json +1 -1
  60. data/grammars/source.vba.json +1 -1
  61. data/grammars/source.vcard.json +1 -0
  62. data/grammars/source.wdl.json +1 -1
  63. data/grammars/text.adblock.json +1 -1
  64. data/grammars/text.html.jte.json +1 -0
  65. data/grammars/text.html.statamic.json +1 -1
  66. data/grammars/text.md.json +1 -1
  67. data/grammars/text.mdx.astro.codeblock.json +1 -0
  68. data/grammars/version +1 -1
  69. data/lib/linguist/VERSION +1 -1
  70. data/lib/linguist/classifier.rb +315 -106
  71. data/lib/linguist/generated.rb +17 -4
  72. data/lib/linguist/generic.yml +1 -0
  73. data/lib/linguist/heuristics.rb +6 -6
  74. data/lib/linguist/heuristics.yml +54 -4
  75. data/lib/linguist/languages.json +1 -1
  76. data/lib/linguist/languages.yml +123 -7
  77. data/lib/linguist/samples.json +1 -1
  78. data/lib/linguist/samples.rb +9 -1
  79. data/lib/linguist/sha256.rb +1 -1
  80. metadata +17 -5
  81. data/grammars/markdown.mcfunction.codeblock.json +0 -1
  82. data/grammars/mdx.LANGUAGE.codeblock.json +0 -1
@@ -88,6 +88,8 @@ disambiguations:
88
88
  - language: Asymptote
89
89
  - extensions: ['.bas']
90
90
  rules:
91
+ - language: B4X
92
+ pattern: '\A\W{0,3}(?:.*(?:\r?\n|\r)){0,9}B4(?:J|A|R|i)=true'
91
93
  - language: FreeBasic
92
94
  pattern: '^[ \t]*#(?i)(?:define|endif|endmacro|ifn?def|include|lang|macro)(?:$|\s)'
93
95
  - language: BASIC
@@ -136,6 +138,11 @@ disambiguations:
136
138
  rules:
137
139
  - language: XML
138
140
  pattern: '^(\s*)(?i:<Project|<Import|<Property|<?xml|xmlns)'
141
+ - extensions: ['.cairo']
142
+ rules:
143
+ - language: Cairo Zero
144
+ pattern: '(^(\s*)%lang(\s+)([A-Za-z0-9_]+))|(^(\s*)%builtins(\s+)([A-Za-z0-9_]+\s*)*$)|(^(\s*)from(\s+)starkware\.(cairo|starknet)\.([A-Za-z0-9_.\s]+?)import)|(,\s*ap\+\+;$)|(;\s*ap\+\+$)'
145
+ - language: Cairo
139
146
  - extensions: ['.ch']
140
147
  rules:
141
148
  - language: xBase
@@ -226,7 +233,7 @@ disambiguations:
226
233
  - language: Erlang
227
234
  pattern: '^\s*(?:%%|main\s*\(.*?\)\s*->)'
228
235
  - language: JavaScript
229
- pattern: '\/\/|("|'')use strict\1|export\s+default\s|\/\*(?:.|[\r\n])*?\*\/'
236
+ pattern: '\/\/|["'']use strict["'']|export\s+default\s|\/\*(?:.|[\r\n])*?\*\/'
230
237
  - extensions: ['.ex']
231
238
  rules:
232
239
  - language: Elixir
@@ -351,7 +358,7 @@ disambiguations:
351
358
  - extensions: ['.ice']
352
359
  rules:
353
360
  - language: JSON
354
- pattern: '\A\s*[{\[]'
361
+ named_pattern: json
355
362
  - language: Slice
356
363
  - extensions: ['.inc']
357
364
  rules:
@@ -508,6 +515,11 @@ disambiguations:
508
515
  - language: NL
509
516
  pattern: '^(b|g)[0-9]+ '
510
517
  - language: NewLisp
518
+ - extensions: ['.nr']
519
+ rules:
520
+ - language: Roff
521
+ pattern: '^\.'
522
+ - language: Noir
511
523
  - extensions: ['.nu']
512
524
  rules:
513
525
  - language: Nushell
@@ -552,7 +564,7 @@ disambiguations:
552
564
  - extensions: ['.plist']
553
565
  rules:
554
566
  - language: XML Property List
555
- pattern: '^\s*(?:<\?xml\s|<!DOCTYPE\s+plist|<plist(?:\s+version\s*=\s*(["''])\d+(?:\.\d+)?\1)?\s*>\s*$)'
567
+ pattern: '^\s*(?:<\?xml\s|<!DOCTYPE\s+plist|<plist(?:\s+version\s*=\s*["'']\d+(?:\.\d+)?["''])?\s*>\s*$)'
556
568
  - language: OpenStep Property List
557
569
  - extensions: ['.plt']
558
570
  rules:
@@ -644,6 +656,11 @@ disambiguations:
644
656
  pattern:
645
657
  - '^\s*(let|module|type)\s+\w*\s+=\s+'
646
658
  - '^\s*(?:include|open)\s+\w+\s*$'
659
+ - extensions: ['.resource']
660
+ rules:
661
+ - language: RobotFramework
662
+ pattern:
663
+ - '^\*{3} (Settings|Variables|Keywords) \*{3}$'
647
664
  - extensions: ['.rno']
648
665
  rules:
649
666
  - language: RUNOFF
@@ -773,6 +790,32 @@ disambiguations:
773
790
  # VIM_MODELINE pattern in `./lib/linguist/strategy/modeline.rb`.
774
791
  - language: Vim Help File
775
792
  pattern: '(?:(?:^|[ \t])(?:vi|Vi(?=m))(?:m[<=>]?[0-9]+|m)?|[ \t]ex)(?=:(?=[ \t]*set?[ \t][^\r\n:]+:)|:(?![ \t]*set?[ \t]))(?:(?:[ \t]*:[ \t]*|[ \t])\w*(?:[ \t]*=(?:[^\\\s]|\\.)*)?)*[ \t:](?:filetype|ft|syntax)[ \t]*=(help)(?=$|\s|:)'
793
+ - language: Hosts File
794
+ pattern: |-
795
+ (?xi) ^
796
+
797
+ # IPv4 address
798
+ (?<ipv4>
799
+ (?!\.)
800
+ (?:\.?
801
+ (?: 25[0-5] # 250-255
802
+ | 2[0-4]\d # 200-249
803
+ | 1\d\d # 100-199
804
+ | [1-9]?\d # 0-99
805
+ )\b
806
+ ){4})
807
+
808
+ # CIDR notation: /[0-32]
809
+ (?<cidr>/(3[0-2]|[12]?\d)\b)?
810
+
811
+ # Domains list
812
+ (?<domains>
813
+ [ \t]+
814
+ \w[-\w]* (?:\.\w[-\w]*)*
815
+ (?<!-)\b
816
+ )*+
817
+
818
+ (?=$|\s)
776
819
  - language: Adblock Filter List
777
820
  pattern: |-
778
821
  (?x)\A
@@ -819,6 +862,12 @@ disambiguations:
819
862
  - language: Vim Script
820
863
  pattern: '^UseVimball'
821
864
  - language: VBA
865
+ - extensions: ['.vcf']
866
+ rules:
867
+ - language: TSV
868
+ pattern: '\A##fileformat=VCF'
869
+ - language: vCard
870
+ pattern: '\ABEGIN:VCARD'
822
871
  - extensions: ['.w']
823
872
  rules:
824
873
  - language: OpenEdge ABL
@@ -848,7 +897,7 @@ disambiguations:
848
897
  - extensions: ['.yy']
849
898
  rules:
850
899
  - language: JSON
851
- pattern: '\"modelName\"\:\s*\"GM'
900
+ named_pattern: json
852
901
  - language: Yacc
853
902
  named_patterns:
854
903
  cpp:
@@ -870,6 +919,7 @@ named_patterns:
870
919
  - '^\s*(?>(?:autoexec|private)\s+){0,2}function\s+(?>(?:autoexec|private)\s+){0,2}\w+\s*\('
871
920
  - '\b(?:level|self)[ \t]+thread[ \t]+(?:\[\[[ \t]*(?>\w+\.)*\w+[ \t]*\]\]|\w+)[ \t]*\([^\r\n\)]*\)[ \t]*;'
872
921
  - '^[ \t]*#[ \t]*(?:precache|using_animtree)[ \t]*\('
922
+ json: '\A\s*[{\[]'
873
923
  key_equals_value: '^[^#!;][^=]*='
874
924
  m68k:
875
925
  - '(?im)\bmoveq(?:\.l)?\s+#(?:\$-?[0-9a-f]{1,3}|%[0-1]{1,8}|-?[0-9]{1,3}),\s*d[0-7]\b'