github-linguist 7.29.0 → 8.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (125) hide show
  1. checksums.yaml +4 -4
  2. data/bin/git-linguist +7 -3
  3. data/bin/github-linguist +6 -3
  4. data/grammars/etc.json +1 -1
  5. data/grammars/inline.edgeql.json +1 -1
  6. data/grammars/inline.graphql.json +1 -1
  7. data/grammars/inline.peggy.json +1 -0
  8. data/grammars/markdown.gleam.codeblock.json +1 -0
  9. data/grammars/markdown.move.codeblock.json +1 -1
  10. data/grammars/markdown.rego.codeblock.json +1 -0
  11. data/grammars/mdx.move.codeblock.json +1 -0
  12. data/grammars/source.8xp.json +1 -1
  13. data/grammars/source.Caddyfile-test.json +1 -0
  14. data/grammars/source.Caddyfile.json +1 -0
  15. data/grammars/source.abl.json +1 -1
  16. data/grammars/source.astro.json +1 -1
  17. data/grammars/source.bicep.json +1 -1
  18. data/grammars/source.bms.json +1 -1
  19. data/grammars/source.bqn.json +1 -0
  20. data/grammars/source.brs.json +1 -1
  21. data/grammars/source.cairo.json +1 -1
  22. data/grammars/source.cairo0.json +1 -0
  23. data/grammars/source.cl.json +1 -1
  24. data/grammars/source.clar.json +1 -1
  25. data/grammars/source.cmd.json +1 -1
  26. data/grammars/source.cobol.json +1 -1
  27. data/grammars/source.commonlisp.json +1 -1
  28. data/grammars/source.cs.json +1 -1
  29. data/grammars/source.curlrc.json +1 -1
  30. data/grammars/source.curry.json +1 -1
  31. data/grammars/source.cylc.json +1 -0
  32. data/grammars/source.d2.json +1 -1
  33. data/grammars/source.dart.json +1 -1
  34. data/grammars/source.dds.dspf.json +1 -1
  35. data/grammars/source.dds.icff.json +1 -1
  36. data/grammars/source.dds.lf.json +1 -1
  37. data/grammars/source.dds.pf.json +1 -1
  38. data/grammars/source.dds.prtf.json +1 -1
  39. data/grammars/source.dune.json +1 -0
  40. data/grammars/source.elvish.json +1 -1
  41. data/grammars/source.firrtl.json +1 -0
  42. data/grammars/source.fsharp.json +1 -1
  43. data/grammars/source.gdscript.json +1 -1
  44. data/grammars/source.generic-db.json +1 -1
  45. data/grammars/source.gitconfig.json +1 -1
  46. data/grammars/source.gjs.json +1 -1
  47. data/grammars/source.gleam.json +1 -1
  48. data/grammars/source.gts.json +1 -1
  49. data/grammars/source.hcl.json +1 -1
  50. data/grammars/source.hcl.terraform.json +1 -1
  51. data/grammars/source.hgignore.json +1 -1
  52. data/grammars/source.hosts.json +1 -1
  53. data/grammars/source.hx.json +1 -1
  54. data/grammars/source.iCalendar.json +1 -0
  55. data/grammars/source.ice.json +1 -1
  56. data/grammars/source.julia.json +1 -1
  57. data/grammars/source.just.json +1 -1
  58. data/grammars/source.kotlin.json +1 -1
  59. data/grammars/source.lcb.json +1 -0
  60. data/grammars/source.lilypond.json +1 -1
  61. data/grammars/source.livecodescript.json +1 -0
  62. data/grammars/source.lua.json +1 -1
  63. data/grammars/source.luau.json +1 -0
  64. data/grammars/source.m2.json +1 -1
  65. data/grammars/source.markdown.caddy.codeblock.json +1 -0
  66. data/grammars/source.matlab.json +1 -1
  67. data/grammars/source.mcfunction.json +1 -1
  68. data/grammars/source.mdx.json +1 -1
  69. data/grammars/source.mo.json +1 -1
  70. data/grammars/source.mojo.json +1 -1
  71. data/grammars/source.move.json +1 -1
  72. data/grammars/source.nanorc.json +1 -1
  73. data/grammars/source.nim.json +1 -1
  74. data/grammars/source.nr.json +1 -0
  75. data/grammars/source.nushell.json +1 -1
  76. data/grammars/source.odin.json +1 -1
  77. data/grammars/source.p4.json +1 -1
  78. data/grammars/source.peggy.json +1 -0
  79. data/grammars/source.pkl.json +1 -0
  80. data/grammars/source.polar.json +1 -1
  81. data/grammars/source.powerbuilder.json +1 -0
  82. data/grammars/source.qsharp.json +1 -1
  83. data/grammars/source.rascal.json +1 -1
  84. data/grammars/source.rego.json +1 -1
  85. data/grammars/source.rescript.json +1 -1
  86. data/grammars/source.ron.json +1 -0
  87. data/grammars/source.rpgle.json +1 -1
  88. data/grammars/source.rust.json +1 -1
  89. data/grammars/source.sentinel.json +1 -1
  90. data/grammars/source.solidity.json +1 -1
  91. data/grammars/source.sourcepawn.json +1 -1
  92. data/grammars/source.sqf.json +1 -1
  93. data/grammars/source.stan.json +1 -1
  94. data/grammars/source.swift.json +1 -1
  95. data/grammars/source.sy.json +1 -1
  96. data/grammars/source.templ.json +1 -0
  97. data/grammars/source.vba.json +1 -1
  98. data/grammars/source.vcard.json +1 -0
  99. data/grammars/source.wdl.json +1 -1
  100. data/grammars/source.wsd.json +1 -1
  101. data/grammars/text.adblock.json +1 -1
  102. data/grammars/text.crontab.json +1 -0
  103. data/grammars/text.html.jte.json +1 -0
  104. data/grammars/text.html.statamic.json +1 -1
  105. data/grammars/text.md.json +1 -1
  106. data/grammars/text.mdx.astro.codeblock.json +1 -0
  107. data/grammars/text.valve-cfg.json +1 -1
  108. data/grammars/version +1 -1
  109. data/lib/linguist/VERSION +1 -1
  110. data/lib/linguist/classifier.rb +315 -106
  111. data/lib/linguist/generated.rb +33 -4
  112. data/lib/linguist/generic.yml +1 -0
  113. data/lib/linguist/heuristics.rb +6 -6
  114. data/lib/linguist/heuristics.yml +63 -4
  115. data/lib/linguist/languages.json +1 -1
  116. data/lib/linguist/languages.yml +224 -4
  117. data/lib/linguist/repository.rb +8 -6
  118. data/lib/linguist/samples.json +1 -1
  119. data/lib/linguist/samples.rb +9 -1
  120. data/lib/linguist/sha256.rb +1 -1
  121. metadata +29 -7
  122. data/grammars/inline.graphql.rb.json +0 -1
  123. data/grammars/markdown.mcfunction.codeblock.json +0 -1
  124. data/grammars/mdx.LANGUAGE.codeblock.json +0 -1
  125. data/grammars/source.terraform.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:
@@ -469,6 +476,8 @@ disambiguations:
469
476
  rules:
470
477
  - language: XML
471
478
  pattern: '<!ENTITY '
479
+ - language: NMODL
480
+ pattern: '\b(NEURON|INITIAL|UNITS)\b'
472
481
  - language: Modula-2
473
482
  pattern: '^\s*(?i:MODULE|END) [\w\.]+;'
474
483
  - language: [Linux Kernel Module, AMPL]
@@ -506,6 +515,11 @@ disambiguations:
506
515
  - language: NL
507
516
  pattern: '^(b|g)[0-9]+ '
508
517
  - language: NewLisp
518
+ - extensions: ['.nr']
519
+ rules:
520
+ - language: Roff
521
+ pattern: '^\.'
522
+ - language: Noir
509
523
  - extensions: ['.nu']
510
524
  rules:
511
525
  - language: Nushell
@@ -530,6 +544,13 @@ disambiguations:
530
544
  pattern: '<\?hh'
531
545
  - language: PHP
532
546
  pattern: '<\?[^h]'
547
+ - extensions: ['.pkl']
548
+ rules:
549
+ - language: Pkl
550
+ pattern:
551
+ - '^\s*(module|import|amends|extends|local|const|fixed|abstract|open|class|typealias|@\w+)\b'
552
+ - '^\s*[a-zA-Z0-9_$]+\s*(=|{|:)|^\s*`[^`]+`\s*(=|{|:)|for\s*\(|when\s*\('
553
+ - language: Pickle
533
554
  - extensions: ['.pl']
534
555
  rules:
535
556
  - language: Prolog
@@ -543,7 +564,7 @@ disambiguations:
543
564
  - extensions: ['.plist']
544
565
  rules:
545
566
  - language: XML Property List
546
- 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*$)'
547
568
  - language: OpenStep Property List
548
569
  - extensions: ['.plt']
549
570
  rules:
@@ -635,6 +656,11 @@ disambiguations:
635
656
  pattern:
636
657
  - '^\s*(let|module|type)\s+\w*\s+=\s+'
637
658
  - '^\s*(?:include|open)\s+\w+\s*$'
659
+ - extensions: ['.resource']
660
+ rules:
661
+ - language: RobotFramework
662
+ pattern:
663
+ - '^\*{3} (Settings|Variables|Keywords) \*{3}$'
638
664
  - extensions: ['.rno']
639
665
  rules:
640
666
  - language: RUNOFF
@@ -764,6 +790,32 @@ disambiguations:
764
790
  # VIM_MODELINE pattern in `./lib/linguist/strategy/modeline.rb`.
765
791
  - language: Vim Help File
766
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)
767
819
  - language: Adblock Filter List
768
820
  pattern: |-
769
821
  (?x)\A
@@ -810,6 +862,12 @@ disambiguations:
810
862
  - language: Vim Script
811
863
  pattern: '^UseVimball'
812
864
  - language: VBA
865
+ - extensions: ['.vcf']
866
+ rules:
867
+ - language: TSV
868
+ pattern: '\A##fileformat=VCF'
869
+ - language: vCard
870
+ pattern: '\ABEGIN:VCARD'
813
871
  - extensions: ['.w']
814
872
  rules:
815
873
  - language: OpenEdge ABL
@@ -839,7 +897,7 @@ disambiguations:
839
897
  - extensions: ['.yy']
840
898
  rules:
841
899
  - language: JSON
842
- pattern: '\"modelName\"\:\s*\"GM'
900
+ named_pattern: json
843
901
  - language: Yacc
844
902
  named_patterns:
845
903
  cpp:
@@ -861,6 +919,7 @@ named_patterns:
861
919
  - '^\s*(?>(?:autoexec|private)\s+){0,2}function\s+(?>(?:autoexec|private)\s+){0,2}\w+\s*\('
862
920
  - '\b(?:level|self)[ \t]+thread[ \t]+(?:\[\[[ \t]*(?>\w+\.)*\w+[ \t]*\]\]|\w+)[ \t]*\([^\r\n\)]*\)[ \t]*;'
863
921
  - '^[ \t]*#[ \t]*(?:precache|using_animtree)[ \t]*\('
922
+ json: '\A\s*[{\[]'
864
923
  key_equals_value: '^[^#!;][^=]*='
865
924
  m68k:
866
925
  - '(?im)\bmoveq(?:\.l)?\s+#(?:\$-?[0-9a-f]{1,3}|%[0-1]{1,8}|-?[0-9]{1,3}),\s*d[0-7]\b'