github-linguist 7.14.0 → 7.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. checksums.yaml +4 -4
  2. data/bin/github-linguist +115 -71
  3. data/grammars/annotation.liquidhaskell.haskell.json +1 -1
  4. data/grammars/etc.json +1 -1
  5. data/grammars/go.mod.json +1 -0
  6. data/grammars/go.sum.json +1 -0
  7. data/grammars/hint.haskell.json +1 -1
  8. data/grammars/hint.message.haskell.json +1 -1
  9. data/grammars/hint.type.haskell.json +1 -1
  10. data/grammars/markdown.bicep.codeblock.json +1 -0
  11. data/grammars/markdown.codeblock.proto.json +1 -0
  12. data/grammars/markdown.mcfunction.codeblock.json +1 -0
  13. data/grammars/source.abap.json +1 -1
  14. data/grammars/source.aidl.json +1 -0
  15. data/grammars/source.al.json +1 -1
  16. data/grammars/source.angelscript.json +1 -1
  17. data/grammars/source.avro.json +1 -1
  18. data/grammars/source.ballerina.json +1 -1
  19. data/grammars/source.batchfile.json +1 -1
  20. data/grammars/source.bc.json +1 -0
  21. data/grammars/source.bicep.json +1 -1
  22. data/grammars/source.boo.json +1 -1
  23. data/grammars/source.bp.json +1 -0
  24. data/grammars/source.cil.json +1 -0
  25. data/grammars/source.cirru.json +1 -1
  26. data/grammars/source.cs.json +1 -1
  27. data/grammars/source.csound.json +1 -1
  28. data/grammars/source.css.json +1 -1
  29. data/grammars/source.cue.json +1 -0
  30. data/grammars/source.cuesheet.json +1 -0
  31. data/grammars/source.dart.json +1 -1
  32. data/grammars/source.dc.json +1 -0
  33. data/grammars/source.ditroff.json +1 -1
  34. data/grammars/source.dotenv.json +1 -0
  35. data/grammars/source.ebnf.json +1 -1
  36. data/grammars/source.ecl.json +1 -0
  37. data/grammars/source.ed.json +1 -0
  38. data/grammars/source.fnl.json +1 -0
  39. data/grammars/source.fontforge.json +1 -1
  40. data/grammars/source.fstar.json +1 -1
  41. data/grammars/source.ftl.json +1 -0
  42. data/grammars/source.gcode.json +1 -1
  43. data/grammars/source.gdscript.json +1 -1
  44. data/grammars/source.hack.json +1 -1
  45. data/grammars/source.haskell.json +1 -1
  46. data/grammars/source.hlcode.json +1 -0
  47. data/grammars/source.hsig.json +1 -1
  48. data/grammars/source.hx.json +1 -1
  49. data/grammars/source.hy.json +1 -1
  50. data/grammars/source.jest.snap.json +1 -0
  51. data/grammars/source.jq.json +1 -1
  52. data/grammars/source.json.json +1 -1
  53. data/grammars/source.julia.json +1 -1
  54. data/grammars/source.kakscript.json +1 -0
  55. data/grammars/source.keyvalues.json +1 -0
  56. data/grammars/source.kotlin.json +1 -1
  57. data/grammars/source.lean.json +1 -1
  58. data/grammars/source.m2.json +1 -1
  59. data/grammars/source.matlab.json +1 -1
  60. data/grammars/source.mcfunction.json +1 -1
  61. data/grammars/source.odin.json +1 -1
  62. data/grammars/source.opentype.json +1 -1
  63. data/grammars/source.pegjs.json +1 -0
  64. data/grammars/source.postscript.json +1 -1
  65. data/grammars/source.powershell.json +1 -1
  66. data/grammars/source.proto.json +1 -0
  67. data/grammars/source.purescript.json +1 -1
  68. data/grammars/source.regexp.json +1 -1
  69. data/grammars/source.regexp.oniguruma.json +1 -0
  70. data/grammars/source.rego.json +1 -1
  71. data/grammars/source.renpy.json +1 -1
  72. data/grammars/source.rescript.json +1 -1
  73. data/grammars/source.sed.json +1 -1
  74. data/grammars/source.sepolicy.json +1 -0
  75. data/grammars/source.shellcheckrc.json +1 -0
  76. data/grammars/source.sqf.json +1 -1
  77. data/grammars/source.swift.json +1 -1
  78. data/grammars/source.sy.json +1 -1
  79. data/grammars/source.tm-properties.json +1 -0
  80. data/grammars/source.ts.json +1 -1
  81. data/grammars/source.tsx.json +1 -1
  82. data/grammars/source.v.json +1 -1
  83. data/grammars/source.viml.json +1 -1
  84. data/grammars/source.webassembly.json +1 -1
  85. data/grammars/source.ws.json +1 -0
  86. data/grammars/source.wsd.json +1 -1
  87. data/grammars/source.xojo.json +1 -1
  88. data/grammars/source.yara.json +1 -1
  89. data/grammars/source.yasnippet.json +1 -1
  90. data/grammars/source.zig.json +1 -1
  91. data/grammars/text.html.astro.json +1 -0
  92. data/grammars/text.html.markdown.astro.json +1 -0
  93. data/grammars/text.info.json +1 -0
  94. data/grammars/text.lesshst.json +1 -0
  95. data/grammars/text.marko.json +1 -1
  96. data/grammars/text.sfd.json +1 -1
  97. data/grammars/text.tex.latex.haskell.json +1 -1
  98. data/grammars/text.xml.svg.json +1 -1
  99. data/grammars/textmate.format-string.json +1 -0
  100. data/grammars/version +1 -1
  101. data/lib/linguist/VERSION +1 -1
  102. data/lib/linguist/documentation.yml +1 -0
  103. data/lib/linguist/generated.rb +13 -0
  104. data/lib/linguist/heuristics.rb +6 -2
  105. data/lib/linguist/heuristics.yml +18 -4
  106. data/lib/linguist/language.rb +6 -3
  107. data/lib/linguist/languages.json +1 -1
  108. data/lib/linguist/languages.yml +385 -43
  109. data/lib/linguist/linguist.bundle +0 -0
  110. data/lib/linguist/linguist.so +0 -0
  111. data/lib/linguist/repository.rb +7 -3
  112. data/lib/linguist/samples.json +1 -1
  113. data/lib/linguist/shebang.rb +4 -1
  114. data/lib/linguist/strategy/modeline.rb +4 -0
  115. data/lib/linguist/vendor.yml +3 -0
  116. metadata +36 -5
  117. data/grammars/source.SASLog.json +0 -1
  118. data/grammars/source.mcfunction-snapshot.json +0 -1
  119. data/grammars/source.protobuf.json +0 -1
@@ -41,7 +41,10 @@ module Linguist
41
41
  # if /usr/bin/env type shebang then walk the string
42
42
  if script == 'env'
43
43
  s.scan(/\s+/)
44
- s.scan(/([^\s]+=[^\s]+\s+)*/) # skip over variable arguments e.g. foo=bar
44
+ while s.scan(/((-[i0uCSv]*|--\S+)\s+)+/) || # skip over optional arguments e.g. -vS
45
+ s.scan(/(\S+=\S+\s+)+/) # skip over variable arguments e.g. foo=bar
46
+ # do nothing
47
+ end
45
48
  script = s.scan(/\S+/)
46
49
  end
47
50
 
@@ -49,6 +49,7 @@ module Linguist
49
49
  -\*-
50
50
  ]xi
51
51
 
52
+ # NOTE: When changing this regex, be sure to keep the Vim Help heuristic updated too (#5347)
52
53
  VIM_MODELINE = %r[
53
54
  (?-m)
54
55
 
@@ -144,6 +145,9 @@ module Linguist
144
145
  return [] if blob.symlink?
145
146
 
146
147
  header = blob.first_lines(SEARCH_SCOPE).join("\n")
148
+ # Return early for Vimball files as their modeline will not reflect their filetype.
149
+ return [] if header.include?("UseVimball")
150
+
147
151
  footer = blob.last_lines(SEARCH_SCOPE).join("\n")
148
152
  Array(Language.find_by_alias(modeline(header + footer)))
149
153
  end
@@ -380,3 +380,6 @@
380
380
 
381
381
  # Jenkins Pipeline
382
382
  - (^|/)Jenkinsfile$
383
+
384
+ # Gitpod
385
+ - (^|/)\.gitpod\.Dockerfile$
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: github-linguist
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.14.0
4
+ version: 7.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-09 00:00:00.000000000 Z
11
+ date: 2021-10-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: charlock_holmes
@@ -231,6 +231,8 @@ files:
231
231
  - grammars/documentation.markdown.injection.haxe.json
232
232
  - grammars/etc.json
233
233
  - grammars/file.lasso.json
234
+ - grammars/go.mod.json
235
+ - grammars/go.sum.json
234
236
  - grammars/hidden.manref.json
235
237
  - grammars/hidden.regexp.injection-shell.json
236
238
  - grammars/hint.haskell.json
@@ -238,14 +240,16 @@ files:
238
240
  - grammars/hint.type.haskell.json
239
241
  - grammars/injections.etc.json
240
242
  - grammars/inline.prisma.json
243
+ - grammars/markdown.bicep.codeblock.json
244
+ - grammars/markdown.codeblock.proto.json
241
245
  - grammars/markdown.hack.codeblock.json
242
246
  - grammars/markdown.haxe.codeblock.json
243
247
  - grammars/markdown.hxml.codeblock.json
244
248
  - grammars/markdown.lean.codeblock.json
249
+ - grammars/markdown.mcfunction.codeblock.json
245
250
  - grammars/markdown.plantuml.codeblock.json
246
251
  - grammars/objdump.x86asm.json
247
252
  - grammars/source.4dm.json
248
- - grammars/source.SASLog.json
249
253
  - grammars/source.abap.json
250
254
  - grammars/source.abapcds.json
251
255
  - grammars/source.abl.json
@@ -257,6 +261,7 @@ files:
257
261
  - grammars/source.agc.json
258
262
  - grammars/source.agda.json
259
263
  - grammars/source.ahk.json
264
+ - grammars/source.aidl.json
260
265
  - grammars/source.al.json
261
266
  - grammars/source.alloy.json
262
267
  - grammars/source.ampl.json
@@ -278,6 +283,7 @@ files:
278
283
  - grammars/source.ballerina.json
279
284
  - grammars/source.basic.json
280
285
  - grammars/source.batchfile.json
286
+ - grammars/source.bc.json
281
287
  - grammars/source.bdf.json
282
288
  - grammars/source.befunge.json
283
289
  - grammars/source.bf.json
@@ -286,6 +292,7 @@ files:
286
292
  - grammars/source.bnf.json
287
293
  - grammars/source.boo.json
288
294
  - grammars/source.boogie.json
295
+ - grammars/source.bp.json
289
296
  - grammars/source.brightauthorproject.json
290
297
  - grammars/source.brightscript.json
291
298
  - grammars/source.bsl.json
@@ -306,6 +313,7 @@ files:
306
313
  - grammars/source.cfscript.json
307
314
  - grammars/source.changelogs.rpm-spec.json
308
315
  - grammars/source.chapel.json
316
+ - grammars/source.cil.json
309
317
  - grammars/source.cirru.json
310
318
  - grammars/source.clarion.json
311
319
  - grammars/source.clean.json
@@ -329,12 +337,15 @@ files:
329
337
  - grammars/source.css.postcss.sugarss.json
330
338
  - grammars/source.css.scss.json
331
339
  - grammars/source.cuda-c++.json
340
+ - grammars/source.cue.json
341
+ - grammars/source.cuesheet.json
332
342
  - grammars/source.curlrc.json
333
343
  - grammars/source.cwl.json
334
344
  - grammars/source.cython.json
335
345
  - grammars/source.d.json
336
346
  - grammars/source.dart.json
337
347
  - grammars/source.data-weave.json
348
+ - grammars/source.dc.json
338
349
  - grammars/source.desktop.json
339
350
  - grammars/source.diff.json
340
351
  - grammars/source.dircolors.json
@@ -347,8 +358,11 @@ files:
347
358
  - grammars/source.dockerfile.json
348
359
  - grammars/source.dosbox-conf.json
349
360
  - grammars/source.dot.json
361
+ - grammars/source.dotenv.json
350
362
  - grammars/source.dylan.json
351
363
  - grammars/source.ebnf.json
364
+ - grammars/source.ecl.json
365
+ - grammars/source.ed.json
352
366
  - grammars/source.editorconfig.json
353
367
  - grammars/source.eiffel.json
354
368
  - grammars/source.elixir.json
@@ -364,6 +378,7 @@ files:
364
378
  - grammars/source.figfont.json
365
379
  - grammars/source.firestore.json
366
380
  - grammars/source.fish.json
381
+ - grammars/source.fnl.json
367
382
  - grammars/source.fontdir.json
368
383
  - grammars/source.fontforge.json
369
384
  - grammars/source.fontinfo.json
@@ -375,6 +390,7 @@ files:
375
390
  - grammars/source.fsharp.fsx.json
376
391
  - grammars/source.fsharp.json
377
392
  - grammars/source.fstar.json
393
+ - grammars/source.ftl.json
378
394
  - grammars/source.futhark.json
379
395
  - grammars/source.gap.json
380
396
  - grammars/source.gcode.json
@@ -409,6 +425,7 @@ files:
409
425
  - grammars/source.haskell.json
410
426
  - grammars/source.hc.json
411
427
  - grammars/source.hgignore.json
428
+ - grammars/source.hlcode.json
412
429
  - grammars/source.hlsl.json
413
430
  - grammars/source.hosts.json
414
431
  - grammars/source.hql.json
@@ -439,6 +456,7 @@ files:
439
456
  - grammars/source.java-properties.json
440
457
  - grammars/source.java.json
441
458
  - grammars/source.jcl.json
459
+ - grammars/source.jest.snap.json
442
460
  - grammars/source.jflex.json
443
461
  - grammars/source.jison.json
444
462
  - grammars/source.jisonlex-injection.json
@@ -455,6 +473,8 @@ files:
455
473
  - grammars/source.jsonnet.json
456
474
  - grammars/source.julia.console.json
457
475
  - grammars/source.julia.json
476
+ - grammars/source.kakscript.json
477
+ - grammars/source.keyvalues.json
458
478
  - grammars/source.kotlin.json
459
479
  - grammars/source.kusto.json
460
480
  - grammars/source.lark.json
@@ -488,7 +508,6 @@ files:
488
508
  - grammars/source.mathematica.json
489
509
  - grammars/source.matlab.json
490
510
  - grammars/source.maxscript.json
491
- - grammars/source.mcfunction-snapshot.json
492
511
  - grammars/source.mcfunction.json
493
512
  - grammars/source.mercury.json
494
513
  - grammars/source.meson.json
@@ -559,6 +578,7 @@ files:
559
578
  - grammars/source.pcb.board.json
560
579
  - grammars/source.pcb.schematic.json
561
580
  - grammars/source.pcb.sexp.json
581
+ - grammars/source.pegjs.json
562
582
  - grammars/source.pep8.json
563
583
  - grammars/source.perl.6.json
564
584
  - grammars/source.perl.json
@@ -578,7 +598,7 @@ files:
578
598
  - grammars/source.processing.json
579
599
  - grammars/source.prolog.eclipse.json
580
600
  - grammars/source.prolog.json
581
- - grammars/source.protobuf.json
601
+ - grammars/source.proto.json
582
602
  - grammars/source.puppet.json
583
603
  - grammars/source.purescript.json
584
604
  - grammars/source.pyjade.json
@@ -607,6 +627,7 @@ files:
607
627
  - grammars/source.reg.json
608
628
  - grammars/source.regexp.extended.json
609
629
  - grammars/source.regexp.json
630
+ - grammars/source.regexp.oniguruma.json
610
631
  - grammars/source.regexp.posix.json
611
632
  - grammars/source.regexp.python.json
612
633
  - grammars/source.regexp.raku.json
@@ -631,8 +652,10 @@ files:
631
652
  - grammars/source.scilab.json
632
653
  - grammars/source.sdbl.json
633
654
  - grammars/source.sed.json
655
+ - grammars/source.sepolicy.json
634
656
  - grammars/source.shaderlab.json
635
657
  - grammars/source.shell.json
658
+ - grammars/source.shellcheckrc.json
636
659
  - grammars/source.shen.json
637
660
  - grammars/source.sieve.json
638
661
  - grammars/source.singularity.json
@@ -668,6 +691,7 @@ files:
668
691
  - grammars/source.thrift.json
669
692
  - grammars/source.tl.json
670
693
  - grammars/source.tla.json
694
+ - grammars/source.tm-properties.json
671
695
  - grammars/source.tnsaudit.json
672
696
  - grammars/source.toc.json
673
697
  - grammars/source.toml.json
@@ -698,6 +722,7 @@ files:
698
722
  - grammars/source.webidl.json
699
723
  - grammars/source.wgetrc.json
700
724
  - grammars/source.wollok.json
725
+ - grammars/source.ws.json
701
726
  - grammars/source.wsd.json
702
727
  - grammars/source.x10.json
703
728
  - grammars/source.x86.json
@@ -735,6 +760,7 @@ files:
735
760
  - grammars/text.html.asciidoc.json
736
761
  - grammars/text.html.asdoc.json
737
762
  - grammars/text.html.asp.json
763
+ - grammars/text.html.astro.json
738
764
  - grammars/text.html.basic.json
739
765
  - grammars/text.html.cfm.json
740
766
  - grammars/text.html.creole.json
@@ -752,6 +778,7 @@ files:
752
778
  - grammars/text.html.jsp.json
753
779
  - grammars/text.html.liquid.json
754
780
  - grammars/text.html.mako.json
781
+ - grammars/text.html.markdown.astro.json
755
782
  - grammars/text.html.markdown.source.gfm.apib.json
756
783
  - grammars/text.html.markdown.source.gfm.mson.json
757
784
  - grammars/text.html.mediawiki.elm-build-output.json
@@ -769,8 +796,10 @@ files:
769
796
  - grammars/text.html.twig.json
770
797
  - grammars/text.html.vue.json
771
798
  - grammars/text.idl-idldoc.json
799
+ - grammars/text.info.json
772
800
  - grammars/text.jade.json
773
801
  - grammars/text.junit-test-report.json
802
+ - grammars/text.lesshst.json
774
803
  - grammars/text.log.latex.json
775
804
  - grammars/text.marko.json
776
805
  - grammars/text.muse.json
@@ -807,6 +836,7 @@ files:
807
836
  - grammars/text.xml.svg.json
808
837
  - grammars/text.xml.xsl.json
809
838
  - grammars/text.zone_file.json
839
+ - grammars/textmate.format-string.json
810
840
  - grammars/version
811
841
  - lib/linguist.rb
812
842
  - lib/linguist/VERSION
@@ -825,6 +855,7 @@ files:
825
855
  - lib/linguist/languages.yml
826
856
  - lib/linguist/lazy_blob.rb
827
857
  - lib/linguist/linguist.bundle
858
+ - lib/linguist/linguist.so
828
859
  - lib/linguist/popular.yml
829
860
  - lib/linguist/repository.rb
830
861
  - lib/linguist/samples.json
@@ -1 +0,0 @@
1
- {"name":"SAS Log","scopeName":"source.SASLog","patterns":[{"name":"keyword.source.SASLog","match":"^NOTE:.*"},{"name":"invalid.source.SASLog","match":"(^(ERROR|WARNING)|Uninitialized| remerg|invalid\\b).*"},{"name":"entity.name.function.source.SASLog","match":"^INFO.*"}]}