Merge pull request #3 from lafriks-fork/feat/sync_linguist_7_9_0

sync to the latest github/linguist v7.9.0
This commit is contained in:
Alexander
2020-03-30 12:28:03 +02:00
committed by GitHub
30 changed files with 52041 additions and 30895 deletions

View File

@ -118,6 +118,8 @@ Parsing [linguist/samples](https://github.com/github/linguist/tree/master/sample
* [Heuristics for ".rno" extension](https://github.com/github/linguist/blob/3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d/lib/linguist/heuristics.yml#L365) in RUNOFF could not be parsed, due to unsupported lookahead in RE2 regexp engine. * [Heuristics for ".rno" extension](https://github.com/github/linguist/blob/3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d/lib/linguist/heuristics.yml#L365) in RUNOFF could not be parsed, due to unsupported lookahead in RE2 regexp engine.
* [Heuristics for ".inc" extension](https://github.com/github/linguist/blob/f0e2d0d7f1ce600b2a5acccaef6b149c87d8b99c/lib/linguist/heuristics.yml#L222) in NASL could not be parsed, due to unsupported possessive quantifier in RE2 regexp engine.
* As of [Linguist v5.3.2](https://github.com/github/linguist/releases/tag/v5.3.2) it is using [flex-based scanner in C for tokenization](https://github.com/github/linguist/pull/3846). Enry still uses [extract_token](https://github.com/github/linguist/pull/3846/files#diff-d5179df0b71620e3fac4535cd1368d15L60) regex-based algorithm. See [#193](https://github.com/src-d/enry/issues/193). * As of [Linguist v5.3.2](https://github.com/github/linguist/releases/tag/v5.3.2) it is using [flex-based scanner in C for tokenization](https://github.com/github/linguist/pull/3846). Enry still uses [extract_token](https://github.com/github/linguist/pull/3846/files#diff-d5179df0b71620e3fac4535cd1368d15L60) regex-based algorithm. See [#193](https://github.com/src-d/enry/issues/193).
* Bayesian classifier can't distinguish "SQL" from "PLpgSQL. See [#194](https://github.com/src-d/enry/issues/194). * Bayesian classifier can't distinguish "SQL" from "PLpgSQL. See [#194](https://github.com/src-d/enry/issues/194).

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
// Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT. // Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d // Extracted from github/linguist commit: 40992ba7f86889f80dfed3ba95e11e1082200bad
package data package data
@ -71,11 +71,13 @@ var LanguagesColor = map[string]string{
"Factor": "#636746", "Factor": "#636746",
"Fancy": "#7b9db4", "Fancy": "#7b9db4",
"Fantom": "#14253c", "Fantom": "#14253c",
"Faust": "#c37240",
"Forth": "#341708", "Forth": "#341708",
"Fortran": "#4d41b1", "Fortran": "#4d41b1",
"FreeMarker": "#0050b2", "FreeMarker": "#0050b2",
"Frege": "#00cafe", "Frege": "#00cafe",
"G-code": "#D08CF2", "G-code": "#D08CF2",
"GAML": "#FFC766",
"GDScript": "#355570", "GDScript": "#355570",
"Game Maker Language": "#71b417", "Game Maker Language": "#71b417",
"Genie": "#fb855d", "Genie": "#fb855d",
@ -96,6 +98,7 @@ var LanguagesColor = map[string]string{
"HolyC": "#ffefaf", "HolyC": "#ffefaf",
"Hy": "#7790B2", "Hy": "#7790B2",
"IDL": "#a3522f", "IDL": "#a3522f",
"IGOR Pro": "#0000cc",
"Idris": "#b30000", "Idris": "#b30000",
"Io": "#a9188d", "Io": "#a9188d",
"Ioke": "#078193", "Ioke": "#078193",
@ -121,6 +124,7 @@ var LanguagesColor = map[string]string{
"Lua": "#000080", "Lua": "#000080",
"MATLAB": "#e16737", "MATLAB": "#e16737",
"MAXScript": "#00a6a6", "MAXScript": "#00a6a6",
"MLIR": "#5EC8DB",
"MQL4": "#62A8D6", "MQL4": "#62A8D6",
"MQL5": "#4A76B8", "MQL5": "#4A76B8",
"MTML": "#b7e1f4", "MTML": "#b7e1f4",
@ -149,8 +153,10 @@ var LanguagesColor = map[string]string{
"Objective-C": "#438eff", "Objective-C": "#438eff",
"Objective-C++": "#6866fb", "Objective-C++": "#6866fb",
"Objective-J": "#ff0c5a", "Objective-J": "#ff0c5a",
"Odin": "#60AFFE",
"Omgrofl": "#cabbff", "Omgrofl": "#cabbff",
"Opal": "#f7ede0", "Opal": "#f7ede0",
"OpenQASM": "#AA70FF",
"Oxygene": "#cdd0e3", "Oxygene": "#cdd0e3",
"Oz": "#fab738", "Oz": "#fab738",
"P4": "#7055b5", "P4": "#7055b5",
@ -163,7 +169,6 @@ var LanguagesColor = map[string]string{
"Pawn": "#dbb284", "Pawn": "#dbb284",
"Pep8": "#C76F5B", "Pep8": "#C76F5B",
"Perl": "#0298c3", "Perl": "#0298c3",
"Perl 6": "#0000fb",
"PigLatin": "#fcd7de", "PigLatin": "#fcd7de",
"Pike": "#005390", "Pike": "#005390",
"PogoScript": "#d80074", "PogoScript": "#d80074",
@ -184,11 +189,14 @@ var LanguagesColor = map[string]string{
"RUNOFF": "#665a4e", "RUNOFF": "#665a4e",
"Racket": "#3c5caa", "Racket": "#3c5caa",
"Ragel": "#9d5200", "Ragel": "#9d5200",
"Raku": "#0000fb",
"Rascal": "#fffaa0", "Rascal": "#fffaa0",
"Reason": "#ff5847",
"Rebol": "#358a5b", "Rebol": "#358a5b",
"Red": "#f50000", "Red": "#f50000",
"Ren'Py": "#ff7f7f", "Ren'Py": "#ff7f7f",
"Ring": "#2D54CB", "Ring": "#2D54CB",
"Riot": "#A71E49",
"Roff": "#ecdebe", "Roff": "#ecdebe",
"Rouge": "#cc0088", "Rouge": "#cc0088",
"Ruby": "#701516", "Ruby": "#701516",
@ -204,12 +212,14 @@ var LanguagesColor = map[string]string{
"Shen": "#120F14", "Shen": "#120F14",
"Slash": "#007eff", "Slash": "#007eff",
"Slice": "#003fa2", "Slice": "#003fa2",
"SmPL": "#c94949",
"Smalltalk": "#596706", "Smalltalk": "#596706",
"Solidity": "#AA6746", "Solidity": "#AA6746",
"SourcePawn": "#5c7611", "SourcePawn": "#5c7611",
"Squirrel": "#800000", "Squirrel": "#800000",
"Stan": "#b2011d", "Stan": "#b2011d",
"Standard ML": "#dc566d", "Standard ML": "#dc566d",
"Starlark": "#76d275",
"SuperCollider": "#46390b", "SuperCollider": "#46390b",
"Swift": "#ffac45", "Swift": "#ffac45",
"SystemVerilog": "#DAE1C2", "SystemVerilog": "#DAE1C2",
@ -220,12 +230,15 @@ var LanguagesColor = map[string]string{
"Turing": "#cf142b", "Turing": "#cf142b",
"TypeScript": "#2b7489", "TypeScript": "#2b7489",
"UnrealScript": "#a54c4d", "UnrealScript": "#a54c4d",
"V": "#5d87bd",
"VBA": "#867db1",
"VBScript": "#15dcdc",
"VCL": "#148AA8", "VCL": "#148AA8",
"VHDL": "#adb2cb", "VHDL": "#adb2cb",
"Vala": "#fbe5cd", "Vala": "#fbe5cd",
"Verilog": "#b2b7f8", "Verilog": "#b2b7f8",
"Vim script": "#199f4b", "Vim script": "#199f4b",
"Visual Basic": "#945db7", "Visual Basic .NET": "#945db7",
"Volt": "#1F1F1F", "Volt": "#1F1F1F",
"Vue": "#2c3e50", "Vue": "#2c3e50",
"WebAssembly": "#04133b", "WebAssembly": "#04133b",
@ -243,6 +256,7 @@ var LanguagesColor = map[string]string{
"Zephir": "#118f9e", "Zephir": "#118f9e",
"Zig": "#ec915c", "Zig": "#ec915c",
"eC": "#913960", "eC": "#913960",
"mIRC Script": "#926059",
"mcfunction": "#E22837", "mcfunction": "#E22837",
"nesC": "#94B0C7", "nesC": "#94B0C7",
"ooc": "#b0b77e", "ooc": "#b0b77e",

View File

@ -1,7 +1,7 @@
// Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT. // Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d // Extracted from github/linguist commit: 40992ba7f86889f80dfed3ba95e11e1082200bad
package data package data
// linguist's commit from which files were generated. // linguist's commit from which files were generated.
var LinguistCommit = "3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d" var LinguistCommit = "40992ba7f86889f80dfed3ba95e11e1082200bad"

View File

@ -1,5 +1,5 @@
// Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT. // Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d // Extracted from github/linguist commit: 40992ba7f86889f80dfed3ba95e11e1082200bad
package data package data
@ -591,6 +591,12 @@ var ContentHeuristics = map[string]*Heuristics{
regexp.MustCompile(`(?m)^(\/\/.+|((import|export)\s+)?(function|int|float|char)\s+((room|repeatedly|on|game)_)?([A-Za-z]+[A-Za-z_0-9]+)\s*[;\(])`), regexp.MustCompile(`(?m)^(\/\/.+|((import|export)\s+)?(function|int|float|char)\s+((room|repeatedly|on|game)_)?([A-Za-z]+[A-Za-z_0-9]+)\s*[;\(])`),
), ),
}, },
".asm": &Heuristics{
rule.Or(
rule.MatchingLanguages("Motorola 68K Assembly"),
regexp.MustCompile(`(?m)(?im)\bmoveq(?:\.l)?\s+#(?:\$-?[0-9a-f]{1,3}|%[0-1]{1,8}|-?[0-9]{1,3}),\s*d[0-7]\b|(?im)^\s*move(?:\.[bwl])?\s+(?:sr|usp),\s*[^\s]+|(?im)^\s*move\.[bwl]\s+.*\b[ad]\d|(?im)^\s*movem\.[bwl]\b|(?im)^\s*move[mp](?:\.[wl])?\b|(?im)^\s*btst\b|(?im)^\s*dbra\b`),
),
},
".asy": &Heuristics{ ".asy": &Heuristics{
rule.Or( rule.Or(
rule.MatchingLanguages("LTspice Symbol"), rule.MatchingLanguages("LTspice Symbol"),
@ -673,6 +679,16 @@ var ContentHeuristics = map[string]*Heuristics{
regexp.MustCompile(`(?m)([\/\\].*:\s+.*\s\\$|: \\$|^[ %]:|^[\w\s\/\\.]+\w+\.\w+\s*:\s+[\w\s\/\\.]+\w+\.\w+)`), regexp.MustCompile(`(?m)([\/\\].*:\s+.*\s\\$|: \\$|^[ %]:|^[\w\s\/\\.]+\w+\.\w+\s*:\s+[\w\s\/\\.]+\w+\.\w+)`),
), ),
}, },
".dsp": &Heuristics{
rule.Or(
rule.MatchingLanguages("Microsoft Developer Studio Project"),
regexp.MustCompile(`(?m)# Microsoft Developer Studio Generated Build File`),
),
rule.Or(
rule.MatchingLanguages("Faust"),
regexp.MustCompile(`(?m)\bprocess\s*[(=]|\b(library|import)\s*\(\s*"|\bdeclare\s+(name|version|author|copyright|license)\s+"`),
),
},
".ecl": &Heuristics{ ".ecl": &Heuristics{
rule.Or( rule.Or(
rule.MatchingLanguages("ECLiPSe"), rule.MatchingLanguages("ECLiPSe"),
@ -772,6 +788,10 @@ var ContentHeuristics = map[string]*Heuristics{
), ),
}, },
".gs": &Heuristics{ ".gs": &Heuristics{
rule.Or(
rule.MatchingLanguages("GLSL"),
regexp.MustCompile(`(?m)^#version\s+[0-9]+\b`),
),
rule.Or( rule.Or(
rule.MatchingLanguages("Gosu"), rule.MatchingLanguages("Gosu"),
regexp.MustCompile(`(?m)^uses java\.`), regexp.MustCompile(`(?m)^uses java\.`),
@ -793,6 +813,16 @@ var ContentHeuristics = map[string]*Heuristics{
regexp.MustCompile(`(?m)<\?hh`), regexp.MustCompile(`(?m)<\?hh`),
), ),
}, },
".i": &Heuristics{
rule.Or(
rule.MatchingLanguages("Motorola 68K Assembly"),
regexp.MustCompile(`(?m)(?im)\bmoveq(?:\.l)?\s+#(?:\$-?[0-9a-f]{1,3}|%[0-1]{1,8}|-?[0-9]{1,3}),\s*d[0-7]\b|(?im)^\s*move(?:\.[bwl])?\s+(?:sr|usp),\s*[^\s]+|(?im)^\s*move\.[bwl]\s+.*\b[ad]\d|(?im)^\s*movem\.[bwl]\b|(?im)^\s*move[mp](?:\.[wl])?\b|(?im)^\s*btst\b|(?im)^\s*dbra\b`),
),
rule.Or(
rule.MatchingLanguages("SWIG"),
regexp.MustCompile(`(?m)^[ \t]*%[a-z_]+\b|^%[{}]$`),
),
},
".ice": &Heuristics{ ".ice": &Heuristics{
rule.Or( rule.Or(
rule.MatchingLanguages("JSON"), rule.MatchingLanguages("JSON"),
@ -803,6 +833,10 @@ var ContentHeuristics = map[string]*Heuristics{
), ),
}, },
".inc": &Heuristics{ ".inc": &Heuristics{
rule.Or(
rule.MatchingLanguages("Motorola 68K Assembly"),
regexp.MustCompile(`(?m)(?im)\bmoveq(?:\.l)?\s+#(?:\$-?[0-9a-f]{1,3}|%[0-1]{1,8}|-?[0-9]{1,3}),\s*d[0-7]\b|(?im)^\s*move(?:\.[bwl])?\s+(?:sr|usp),\s*[^\s]+|(?im)^\s*move\.[bwl]\s+.*\b[ad]\d|(?im)^\s*movem\.[bwl]\b|(?im)^\s*move[mp](?:\.[wl])?\b|(?im)^\s*btst\b|(?im)^\s*dbra\b`),
),
rule.Or( rule.Or(
rule.MatchingLanguages("PHP"), rule.MatchingLanguages("PHP"),
regexp.MustCompile(`(?m)^<\?(?:php)?`), regexp.MustCompile(`(?m)^<\?(?:php)?`),
@ -931,6 +965,12 @@ var ContentHeuristics = map[string]*Heuristics{
rule.MatchingLanguages("Roff"), rule.MatchingLanguages("Roff"),
), ),
}, },
".mask": &Heuristics{
rule.Or(
rule.MatchingLanguages("Unity3d Asset"),
regexp.MustCompile(`(?m)tag:unity3d.com`),
),
},
".md": &Heuristics{ ".md": &Heuristics{
rule.Or( rule.Or(
rule.MatchingLanguages("Markdown"), rule.MatchingLanguages("Markdown"),
@ -1047,6 +1087,25 @@ var ContentHeuristics = map[string]*Heuristics{
rule.MatchingLanguages("NewLisp"), rule.MatchingLanguages("NewLisp"),
), ),
}, },
".odin": &Heuristics{
rule.Or(
rule.MatchingLanguages("Object Data Instance Notation"),
regexp.MustCompile(`(?m)(?:^|<)\s*[A-Za-z0-9_]+\s*=\s*<`),
),
rule.Or(
rule.MatchingLanguages("Odin"),
regexp.MustCompile(`(?m)package\s+\w+|\b(?:im|ex)port\s*"[\w:./]+"|\w+\s*::\s*(?:proc|struct)\s*\(|^\s*//\s`),
),
},
".p": &Heuristics{
rule.Or(
rule.MatchingLanguages("Gnuplot"),
regexp.MustCompile(`(?m)^s?plot\b|^set\s+(term|terminal|out|output|[xy]tics|[xy]label|[xy]range|style)\b`),
),
rule.Always(
rule.MatchingLanguages("OpenEdge ABL"),
),
},
".php": &Heuristics{ ".php": &Heuristics{
rule.Or( rule.Or(
rule.MatchingLanguages("Hack"), rule.MatchingLanguages("Hack"),
@ -1067,17 +1126,26 @@ var ContentHeuristics = map[string]*Heuristics{
regexp.MustCompile(`(?m)\buse\s+(?:strict\b|v?5\.)`), regexp.MustCompile(`(?m)\buse\s+(?:strict\b|v?5\.)`),
), ),
rule.Or( rule.Or(
rule.MatchingLanguages("Perl 6"), rule.MatchingLanguages("Raku"),
regexp.MustCompile(`(?m)^\s*(?:use\s+v6\b|\bmodule\b|\b(?:my\s+)?class\b)`), regexp.MustCompile(`(?m)^\s*(?:use\s+v6\b|\bmodule\b|\b(?:my\s+)?class\b)`),
), ),
}, },
".plist": &Heuristics{
rule.Or(
rule.MatchingLanguages("XML Property List"),
regexp.MustCompile(`(?m)<!DOCTYPE\s+plist`),
),
rule.Always(
rule.MatchingLanguages("OpenStep Property List"),
),
},
".pm": &Heuristics{ ".pm": &Heuristics{
rule.Or( rule.Or(
rule.MatchingLanguages("Perl"), rule.MatchingLanguages("Perl"),
regexp.MustCompile(`(?m)\buse\s+(?:strict\b|v?5\.)`), regexp.MustCompile(`(?m)\buse\s+(?:strict\b|v?5\.)`),
), ),
rule.Or( rule.Or(
rule.MatchingLanguages("Perl 6"), rule.MatchingLanguages("Raku"),
regexp.MustCompile(`(?m)^\s*(?:use\s+v6\b|\bmodule\b|\b(?:my\s+)?class\b)`), regexp.MustCompile(`(?m)^\s*(?:use\s+v6\b|\bmodule\b|\b(?:my\s+)?class\b)`),
), ),
rule.Or( rule.Or(
@ -1105,6 +1173,10 @@ var ContentHeuristics = map[string]*Heuristics{
), ),
}, },
".pro": &Heuristics{ ".pro": &Heuristics{
rule.Or(
rule.MatchingLanguages("Proguard"),
regexp.MustCompile(`(?m)^-(include\b.*\.pro$|keep\b|keepclassmembers\b|keepattributes\b)`),
),
rule.Or( rule.Or(
rule.MatchingLanguages("Prolog"), rule.MatchingLanguages("Prolog"),
regexp.MustCompile(`(?m)^[^\[#]+:-`), regexp.MustCompile(`(?m)^[^\[#]+:-`),
@ -1216,6 +1288,12 @@ var ContentHeuristics = map[string]*Heuristics{
regexp.MustCompile(`(?m)#include|#pragma\s+(rs|version)|__attribute__`), regexp.MustCompile(`(?m)#include|#pragma\s+(rs|version)|__attribute__`),
), ),
}, },
".s": &Heuristics{
rule.Or(
rule.MatchingLanguages("Motorola 68K Assembly"),
regexp.MustCompile(`(?m)(?im)\bmoveq(?:\.l)?\s+#(?:\$-?[0-9a-f]{1,3}|%[0-1]{1,8}|-?[0-9]{1,3}),\s*d[0-7]\b|(?im)^\s*move(?:\.[bwl])?\s+(?:sr|usp),\s*[^\s]+|(?im)^\s*move\.[bwl]\s+.*\b[ad]\d|(?im)^\s*movem\.[bwl]\b|(?im)^\s*move[mp](?:\.[wl])?\b|(?im)^\s*btst\b|(?im)^\s*dbra\b`),
),
},
".sc": &Heuristics{ ".sc": &Heuristics{
rule.Or( rule.Or(
rule.MatchingLanguages("SuperCollider"), rule.MatchingLanguages("SuperCollider"),
@ -1267,7 +1345,7 @@ var ContentHeuristics = map[string]*Heuristics{
regexp.MustCompile(`(?m)\buse\s+(?:strict\b|v?5\.)`), regexp.MustCompile(`(?m)\buse\s+(?:strict\b|v?5\.)`),
), ),
rule.Or( rule.Or(
rule.MatchingLanguages("Perl 6"), rule.MatchingLanguages("Raku"),
regexp.MustCompile(`(?m)^\s*(?:use\s+v6\b|\bmodule\b|\b(?:my\s+)?class\b)`), regexp.MustCompile(`(?m)^\s*(?:use\s+v6\b|\bmodule\b|\b(?:my\s+)?class\b)`),
), ),
rule.Or( rule.Or(
@ -1313,13 +1391,27 @@ var ContentHeuristics = map[string]*Heuristics{
regexp.MustCompile(`(?m)(?i:^\s*<\?xml\s+version)`), regexp.MustCompile(`(?m)(?i:^\s*<\?xml\s+version)`),
), ),
}, },
".v": &Heuristics{
rule.Or(
rule.MatchingLanguages("Coq"),
regexp.MustCompile(`(?m)\(\*.*?\*\)|(?:^|\s)(?:Proof|Qed)\.(?:$|\s)|(?:^|\s)Require[ \t]+Import\s`),
),
rule.Or(
rule.MatchingLanguages("Verilog"),
regexp.MustCompile(`(?m)^[ \t]*module\s+[^\s()]+\s+\#?\(|^[ \t]*`+"`"+`(?:ifdef|timescale)\s|^[ \t]*always[ \t]+@`),
),
rule.Or(
rule.MatchingLanguages("V"),
regexp.MustCompile(`(?m)\$(?:if|else)[ \t]|^[ \t]*fn\s+[^\s()]+\(.*?\).*?\{|^[ \t]*for\s*\{`),
),
},
".vba": &Heuristics{ ".vba": &Heuristics{
rule.Or( rule.Or(
rule.MatchingLanguages("Vim script"), rule.MatchingLanguages("Vim script"),
regexp.MustCompile(`(?m)^UseVimball`), regexp.MustCompile(`(?m)^UseVimball`),
), ),
rule.Always( rule.Always(
rule.MatchingLanguages("Visual Basic"), rule.MatchingLanguages("VBA"),
), ),
}, },
".w": &Heuristics{ ".w": &Heuristics{
@ -1333,6 +1425,10 @@ var ContentHeuristics = map[string]*Heuristics{
), ),
}, },
".x": &Heuristics{ ".x": &Heuristics{
rule.Or(
rule.MatchingLanguages("DirectX 3D File"),
regexp.MustCompile(`(?m)^xof 030(2|3)(?:txt|bin|tzip|bzip)\b`),
),
rule.Or( rule.Or(
rule.MatchingLanguages("RPC"), rule.MatchingLanguages("RPC"),
regexp.MustCompile(`(?m)\b(program|version)\s+\w+\s*{|\bunion\s+\w+\s+switch\s*\(`), regexp.MustCompile(`(?m)\b(program|version)\s+\w+\s*{|\bunion\s+\w+\s+switch\s*\(`),

View File

@ -1,5 +1,5 @@
// Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT. // Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d // Extracted from github/linguist commit: 40992ba7f86889f80dfed3ba95e11e1082200bad
package data package data

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
// Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT. // Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d // Extracted from github/linguist commit: 40992ba7f86889f80dfed3ba95e11e1082200bad
package data package data
@ -23,7 +23,10 @@ var LanguagesByFilename = map[string][]string{
".coffeelintignore": {"Ignore List"}, ".coffeelintignore": {"Ignore List"},
".cproject": {"XML"}, ".cproject": {"XML"},
".cshrc": {"Shell"}, ".cshrc": {"Shell"},
".curlrc": {"cURL Config"},
".cvsignore": {"Ignore List"}, ".cvsignore": {"Ignore List"},
".dir_colors": {"dircolors"},
".dircolors": {"dircolors"},
".dockerignore": {"Ignore List"}, ".dockerignore": {"Ignore List"},
".editorconfig": {"EditorConfig"}, ".editorconfig": {"EditorConfig"},
".emacs": {"Emacs Lisp"}, ".emacs": {"Emacs Lisp"},
@ -43,14 +46,17 @@ var LanguagesByFilename = map[string][]string{
".gvimrc": {"Vim script"}, ".gvimrc": {"Vim script"},
".htaccess": {"ApacheConf"}, ".htaccess": {"ApacheConf"},
".htmlhintrc": {"JSON"}, ".htmlhintrc": {"JSON"},
".inputrc": {"Readline Config"},
".irbrc": {"Ruby"}, ".irbrc": {"Ruby"},
".jscsrc": {"JSON with Comments"}, ".jscsrc": {"JSON with Comments"},
".jshintrc": {"JSON with Comments"}, ".jshintrc": {"JSON with Comments"},
".jslintrc": {"JSON with Comments"}, ".jslintrc": {"JSON with Comments"},
".login": {"Shell"}, ".login": {"Shell"},
".luacheckrc": {"Lua"},
".nanorc": {"nanorc"}, ".nanorc": {"nanorc"},
".nodemonignore": {"Ignore List"}, ".nodemonignore": {"Ignore List"},
".npmignore": {"Ignore List"}, ".npmignore": {"Ignore List"},
".npmrc": {"NPM Config"},
".nvimrc": {"Vim script"}, ".nvimrc": {"Vim script"},
".php": {"PHP"}, ".php": {"PHP"},
".php_cs": {"PHP"}, ".php_cs": {"PHP"},
@ -67,6 +73,7 @@ var LanguagesByFilename = map[string][]string{
".viper": {"Emacs Lisp"}, ".viper": {"Emacs Lisp"},
".vscodeignore": {"Ignore List"}, ".vscodeignore": {"Ignore List"},
".watchmanconfig": {"JSON"}, ".watchmanconfig": {"JSON"},
".wgetrc": {"Wget Config"},
".zlogin": {"Shell"}, ".zlogin": {"Shell"},
".zlogout": {"Shell"}, ".zlogout": {"Shell"},
".zprofile": {"Shell"}, ".zprofile": {"Shell"},
@ -77,9 +84,9 @@ var LanguagesByFilename = map[string][]string{
"App.config": {"XML"}, "App.config": {"XML"},
"Appraisals": {"Ruby"}, "Appraisals": {"Ruby"},
"BSDmakefile": {"Makefile"}, "BSDmakefile": {"Makefile"},
"BUCK": {"Python"}, "BUCK": {"Starlark"},
"BUILD": {"Python"}, "BUILD": {"Starlark"},
"BUILD.bazel": {"Python"}, "BUILD.bazel": {"Starlark"},
"Berksfile": {"Ruby"}, "Berksfile": {"Ruby"},
"Brewfile": {"Ruby"}, "Brewfile": {"Ruby"},
"Buildfile": {"Ruby"}, "Buildfile": {"Ruby"},
@ -91,6 +98,8 @@ var LanguagesByFilename = map[string][]string{
"Capfile": {"Ruby"}, "Capfile": {"Ruby"},
"Cargo.lock": {"TOML"}, "Cargo.lock": {"TOML"},
"Cask": {"Emacs Lisp"}, "Cask": {"Emacs Lisp"},
"DEPS": {"Python"},
"DIR_COLORS": {"dircolors"},
"Dangerfile": {"Ruby"}, "Dangerfile": {"Ruby"},
"Deliverfile": {"Ruby"}, "Deliverfile": {"Ruby"},
"Dockerfile": {"Dockerfile"}, "Dockerfile": {"Dockerfile"},
@ -144,11 +153,14 @@ var LanguagesByFilename = map[string][]string{
"Snapfile": {"Ruby"}, "Snapfile": {"Ruby"},
"Thorfile": {"Ruby"}, "Thorfile": {"Ruby"},
"Vagrantfile": {"Ruby"}, "Vagrantfile": {"Ruby"},
"WORKSPACE": {"Python"}, "WORKSPACE": {"Starlark"},
"Web.Debug.config": {"XML"}, "Web.Debug.config": {"XML"},
"Web.Release.config": {"XML"}, "Web.Release.config": {"XML"},
"Web.config": {"XML"}, "Web.config": {"XML"},
"XCompose": {"XCompose"}, "XCompose": {"XCompose"},
"_curlrc": {"cURL Config"},
"_dir_colors": {"dircolors"},
"_dircolors": {"dircolors"},
"_emacs": {"Emacs Lisp"}, "_emacs": {"Emacs Lisp"},
"_vimrc": {"Vim script"}, "_vimrc": {"Vim script"},
"abbrev_defs": {"Emacs Lisp"}, "abbrev_defs": {"Emacs Lisp"},
@ -173,7 +185,9 @@ var LanguagesByFilename = map[string][]string{
"delete.me": {"Text"}, "delete.me": {"Text"},
"descrip.mmk": {"Module Management System"}, "descrip.mmk": {"Module Management System"},
"descrip.mms": {"Module Management System"}, "descrip.mms": {"Module Management System"},
"dir_colors": {"dircolors"},
"encodings.dir": {"X Font Directory Index"}, "encodings.dir": {"X Font Directory Index"},
"eqnrc": {"Roff"},
"expr-dist": {"R"}, "expr-dist": {"R"},
"firestore.rules": {"Cloud Firestore Security Rules"}, "firestore.rules": {"Cloud Firestore Security Rules"},
"fonts.alias": {"X Font Directory Index"}, "fonts.alias": {"X Font Directory Index"},
@ -189,6 +203,7 @@ var LanguagesByFilename = map[string][]string{
"gvimrc": {"Vim script"}, "gvimrc": {"Vim script"},
"haproxy.cfg": {"HAProxy"}, "haproxy.cfg": {"HAProxy"},
"httpd.conf": {"ApacheConf"}, "httpd.conf": {"ApacheConf"},
"inputrc": {"Readline Config"},
"jsconfig.json": {"JSON with Comments"}, "jsconfig.json": {"JSON with Comments"},
"keep.me": {"Text"}, "keep.me": {"Text"},
"language-configuration.json": {"JSON with Comments"}, "language-configuration.json": {"JSON with Comments"},
@ -212,6 +227,9 @@ var LanguagesByFilename = map[string][]string{
"nim.cfg": {"Nim"}, "nim.cfg": {"Nim"},
"nvimrc": {"Vim script"}, "nvimrc": {"Vim script"},
"owh": {"Tcl"}, "owh": {"Tcl"},
"package.mask": {"Text"},
"package.use.mask": {"Text"},
"package.use.stable.mask": {"Text"},
"packages.config": {"XML"}, "packages.config": {"XML"},
"pom.xml": {"Maven POM"}, "pom.xml": {"Maven POM"},
"profile": {"Shell"}, "profile": {"Shell"},
@ -229,10 +247,15 @@ var LanguagesByFilename = map[string][]string{
"sshd_config": {"SSH Config"}, "sshd_config": {"SSH Config"},
"starfield": {"Tcl"}, "starfield": {"Tcl"},
"test.me": {"Text"}, "test.me": {"Text"},
"troffrc": {"Roff"},
"troffrc-end": {"Roff"},
"tsconfig.json": {"JSON with Comments"}, "tsconfig.json": {"JSON with Comments"},
"use.mask": {"Text"},
"use.stable.mask": {"Text"},
"vimrc": {"Vim script"}, "vimrc": {"Vim script"},
"wscript": {"Python"}, "wscript": {"Python"},
"xcompose": {"XCompose"}, "xcompose": {"XCompose"},
"yarn.lock": {"YAML"},
"zlogin": {"Shell"}, "zlogin": {"Shell"},
"zlogout": {"Shell"}, "zlogout": {"Shell"},
"zprofile": {"Shell"}, "zprofile": {"Shell"},

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
// Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT. // Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d // Extracted from github/linguist commit: 40992ba7f86889f80dfed3ba95e11e1082200bad
package data package data
@ -20,6 +20,7 @@ var LanguagesByInterpreter = map[string][]string{
"coffee": {"CoffeeScript"}, "coffee": {"CoffeeScript"},
"cperl": {"Perl"}, "cperl": {"Perl"},
"crystal": {"Crystal"}, "crystal": {"Crystal"},
"csh": {"Tcsh"},
"csi": {"Scheme"}, "csi": {"Scheme"},
"cvc4": {"SMT"}, "cvc4": {"SMT"},
"cwl-runner": {"Common Workflow Language"}, "cwl-runner": {"Common Workflow Language"},
@ -36,6 +37,7 @@ var LanguagesByInterpreter = map[string][]string{
"gawk": {"Awk"}, "gawk": {"Awk"},
"gerbv": {"Gerber Image"}, "gerbv": {"Gerber Image"},
"gerbview": {"Gerber Image"}, "gerbview": {"Gerber Image"},
"gjs": {"JavaScript"},
"gn": {"GN"}, "gn": {"GN"},
"gnuplot": {"Gnuplot"}, "gnuplot": {"Gnuplot"},
"gosh": {"Scheme"}, "gosh": {"Scheme"},
@ -57,6 +59,7 @@ var LanguagesByInterpreter = map[string][]string{
"lua": {"Lua", "Terra"}, "lua": {"Lua", "Terra"},
"macruby": {"Ruby"}, "macruby": {"Ruby"},
"make": {"Makefile"}, "make": {"Makefile"},
"makeinfo": {"Texinfo"},
"mathsat5": {"SMT"}, "mathsat5": {"SMT"},
"mawk": {"Awk"}, "mawk": {"Awk"},
"minised": {"sed"}, "minised": {"sed"},
@ -77,7 +80,7 @@ var LanguagesByInterpreter = map[string][]string{
"parrot": {"Parrot Assembly", "Parrot Internal Representation"}, "parrot": {"Parrot Assembly", "Parrot Internal Representation"},
"pdksh": {"Shell"}, "pdksh": {"Shell"},
"perl": {"Perl", "Pod"}, "perl": {"Perl", "Pod"},
"perl6": {"Perl 6", "Pod 6"}, "perl6": {"Pod 6", "Raku"},
"php": {"PHP"}, "php": {"PHP"},
"picolisp": {"PicoLisp"}, "picolisp": {"PicoLisp"},
"pike": {"Pike"}, "pike": {"Pike"},
@ -86,10 +89,13 @@ var LanguagesByInterpreter = map[string][]string{
"python": {"Python"}, "python": {"Python"},
"python2": {"Python"}, "python2": {"Python"},
"python3": {"Python"}, "python3": {"Python"},
"qjs": {"JavaScript"},
"qmake": {"QMake"}, "qmake": {"QMake"},
"r6rs": {"Scheme"}, "r6rs": {"Scheme"},
"racket": {"Racket"}, "racket": {"Racket"},
"rake": {"Ruby"}, "rake": {"Ruby"},
"raku": {"Raku"},
"rakudo": {"Raku"},
"rbx": {"Ruby"}, "rbx": {"Ruby"},
"rc": {"Shell"}, "rc": {"Shell"},
"regina": {"REXX"}, "regina": {"REXX"},
@ -112,6 +118,7 @@ var LanguagesByInterpreter = map[string][]string{
"swipl": {"Prolog"}, "swipl": {"Prolog"},
"tcc": {"C"}, "tcc": {"C"},
"tclsh": {"Tcl"}, "tclsh": {"Tcl"},
"tcsh": {"Tcsh"},
"ts-node": {"TypeScript"}, "ts-node": {"TypeScript"},
"v8": {"JavaScript"}, "v8": {"JavaScript"},
"v8-shell": {"JavaScript"}, "v8-shell": {"JavaScript"},

View File

@ -1,5 +1,5 @@
// Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT. // Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d // Extracted from github/linguist commit: 40992ba7f86889f80dfed3ba95e11e1082200bad
package data package data
@ -13,6 +13,7 @@ var LanguagesMime = map[string]string{
"Ant Build System": "application/xml", "Ant Build System": "application/xml",
"Apex": "text/x-java", "Apex": "text/x-java",
"Asymptote": "text/x-kotlin", "Asymptote": "text/x-kotlin",
"BibTeX": "text/x-stex",
"Brainfuck": "text/x-brainfuck", "Brainfuck": "text/x-brainfuck",
"C": "text/x-csrc", "C": "text/x-csrc",
"C#": "text/x-csharp", "C#": "text/x-csharp",
@ -50,7 +51,7 @@ var LanguagesMime = map[string]string{
"Easybuild": "text/x-python", "Easybuild": "text/x-python",
"Ecere Projects": "application/json", "Ecere Projects": "application/json",
"EditorConfig": "text/x-properties", "EditorConfig": "text/x-properties",
"Edje Data Collection": "application/json", "Edje Data Collection": "text/x-c++src",
"Eiffel": "text/x-eiffel", "Eiffel": "text/x-eiffel",
"Elm": "text/x-elm", "Elm": "text/x-elm",
"Emacs Lisp": "text/x-common-lisp", "Emacs Lisp": "text/x-common-lisp",
@ -146,7 +147,6 @@ var LanguagesMime = map[string]string{
"PLpgSQL": "text/x-sql", "PLpgSQL": "text/x-sql",
"Pascal": "text/x-pascal", "Pascal": "text/x-pascal",
"Perl": "text/x-perl", "Perl": "text/x-perl",
"Perl 6": "text/x-perl",
"Pic": "text/troff", "Pic": "text/troff",
"Pod": "text/x-perl", "Pod": "text/x-perl",
"PowerShell": "application/x-powershell", "PowerShell": "application/x-powershell",
@ -161,6 +161,7 @@ var LanguagesMime = map[string]string{
"RHTML": "application/x-erb", "RHTML": "application/x-erb",
"RMarkdown": "text/x-gfm", "RMarkdown": "text/x-gfm",
"RPM Spec": "text/x-rpm-spec", "RPM Spec": "text/x-rpm-spec",
"Raku": "text/x-perl",
"Reason": "text/x-rustsrc", "Reason": "text/x-rustsrc",
"Roff": "text/troff", "Roff": "text/troff",
"Roff Manpage": "text/troff", "Roff Manpage": "text/troff",
@ -174,6 +175,7 @@ var LanguagesMime = map[string]string{
"SQLPL": "text/x-sql", "SQLPL": "text/x-sql",
"SRecode Template": "text/x-common-lisp", "SRecode Template": "text/x-common-lisp",
"SVG": "text/xml", "SVG": "text/xml",
"SWIG": "text/x-c++src",
"Sage": "text/x-python", "Sage": "text/x-python",
"SaltStack": "text/x-yaml", "SaltStack": "text/x-yaml",
"Sass": "text/x-sass", "Sass": "text/x-sass",
@ -186,6 +188,7 @@ var LanguagesMime = map[string]string{
"Smarty": "text/x-smarty", "Smarty": "text/x-smarty",
"Squirrel": "text/x-c++src", "Squirrel": "text/x-c++src",
"Standard ML": "text/x-ocaml", "Standard ML": "text/x-ocaml",
"Starlark": "text/x-python",
"Svelte": "text/html", "Svelte": "text/html",
"Swift": "text/x-swift", "Swift": "text/x-swift",
"SystemVerilog": "text/x-systemverilog", "SystemVerilog": "text/x-systemverilog",
@ -203,9 +206,12 @@ var LanguagesMime = map[string]string{
"Unity3D Asset": "text/x-yaml", "Unity3D Asset": "text/x-yaml",
"Uno": "text/x-csharp", "Uno": "text/x-csharp",
"UnrealScript": "text/x-java", "UnrealScript": "text/x-java",
"V": "text/x-go",
"VBA": "text/x-vb",
"VBScript": "text/vbscript",
"VHDL": "text/x-vhdl", "VHDL": "text/x-vhdl",
"Verilog": "text/x-verilog", "Verilog": "text/x-verilog",
"Visual Basic": "text/x-vb", "Visual Basic .NET": "text/x-vb",
"Volt": "text/x-d", "Volt": "text/x-d",
"WebAssembly": "text/x-common-lisp", "WebAssembly": "text/x-common-lisp",
"WebIDL": "text/x-webidl", "WebIDL": "text/x-webidl",
@ -214,6 +220,7 @@ var LanguagesMime = map[string]string{
"X PixMap": "text/x-csrc", "X PixMap": "text/x-csrc",
"XC": "text/x-csrc", "XC": "text/x-csrc",
"XML": "text/xml", "XML": "text/xml",
"XML Property List": "text/xml",
"XPages": "text/xml", "XPages": "text/xml",
"XProc": "text/xml", "XProc": "text/xml",
"XQuery": "application/xquery", "XQuery": "application/xquery",

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
// Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT. // Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d // Extracted from github/linguist commit: 40992ba7f86889f80dfed3ba95e11e1082200bad
package data package data
@ -19,8 +19,11 @@ var VendorMatchers = substring.Or(
substring.Regexp(`(^|/)ltsugar.m4`), substring.Regexp(`(^|/)ltsugar.m4`),
substring.Regexp(`(^|/)ltversion.m4`), substring.Regexp(`(^|/)ltversion.m4`),
substring.Regexp(`(^|/)lt~obsolete.m4`), substring.Regexp(`(^|/)lt~obsolete.m4`),
substring.Regexp(`dotnet-install\.(ps1|sh)$`),
substring.Regexp(`cpplint.py`), substring.Regexp(`cpplint.py`),
substring.Regexp(`node_modules/`), substring.Regexp(`node_modules/`),
substring.Regexp(`(^|/)\.yarn/releases/`),
substring.Regexp(`(^|/)_esy$`),
substring.Regexp(`bower_components/`), substring.Regexp(`bower_components/`),
substring.Regexp(`^rebar$`), substring.Regexp(`^rebar$`),
substring.Regexp(`erlang.mk`), substring.Regexp(`erlang.mk`),

View File

@ -27,12 +27,12 @@ var ContentHeuristics = map[string]*Heuristics{
{{- else if eq .Op "Or" -}} {{- else if eq .Op "Or" -}}
rule.Or( rule.Or(
{{ template "Languages" .Langs -}} {{ template "Languages" .Langs -}}
regexp.MustCompile(`{{ .Pattern }}`), regexp.MustCompile({{ .Pattern | stringVal }}),
), ),
{{- else if eq .Op "Not" -}} {{- else if eq .Op "Not" -}}
rule.Not( rule.Not(
{{ template "Languages" .Langs -}} {{ template "Languages" .Langs -}}
regexp.MustCompile(`{{ .Pattern }}`), regexp.MustCompile({{ .Pattern | stringVal }}),
), ),
{{- else if eq .Op "Always" -}} {{- else if eq .Op "Always" -}}
rule.Always( rule.Always(

View File

@ -4,10 +4,12 @@ package generator
import ( import (
"bytes" "bytes"
"fmt"
"go/format" "go/format"
"io" "io"
"io/ioutil" "io/ioutil"
"path/filepath" "path/filepath"
"strings"
"text/template" "text/template"
) )
@ -32,12 +34,19 @@ func executeTemplate(w io.Writer, name, path, commit string, fmap template.FuncM
getCommit := func() string { getCommit := func() string {
return commit return commit
} }
// stringVal returns escaped string that can be directly placed into go code.
// for value test`s it would return `test`+"`"+`s`
stringVal := func(val string) string {
val = strings.ReplaceAll(val, "`", "`+\"`\"+`")
return fmt.Sprintf("`%s`", val)
}
const headerTmpl = "header.go.tmpl" const headerTmpl = "header.go.tmpl"
headerPath := filepath.Join(filepath.Dir(path), headerTmpl) headerPath := filepath.Join(filepath.Dir(path), headerTmpl)
h := template.Must(template.New(headerTmpl).Funcs(template.FuncMap{ h := template.Must(template.New(headerTmpl).Funcs(template.FuncMap{
"getCommit": getCommit, "getCommit": getCommit,
"stringVal": stringVal,
}).ParseFiles(headerPath)) }).ParseFiles(headerPath))
buf := bytes.NewBuffer(nil) buf := bytes.NewBuffer(nil)
@ -49,6 +58,7 @@ func executeTemplate(w io.Writer, name, path, commit string, fmap template.FuncM
fmap = make(template.FuncMap) fmap = make(template.FuncMap)
} }
fmap["getCommit"] = getCommit fmap["getCommit"] = getCommit
fmap["stringVal"] = stringVal
t := template.Must(template.New(name).Funcs(fmap).ParseFiles(path)) t := template.Must(template.New(name).Funcs(fmap).ParseFiles(path))
if err := t.Execute(buf, data); err != nil { if err := t.Execute(buf, data); err != nil {

View File

@ -19,7 +19,7 @@ import (
var ( var (
linguistURL = "https://github.com/github/linguist.git" linguistURL = "https://github.com/github/linguist.git"
linguistClonedEnvVar = "ENRY_TEST_REPO" linguistClonedEnvVar = "ENRY_TEST_REPO"
commit = "3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d" commit = "40992ba7f86889f80dfed3ba95e11e1082200bad"
samplesDir = "samples" samplesDir = "samples"
languagesFile = filepath.Join("lib", "linguist", "languages.yml") languagesFile = filepath.Join("lib", "linguist", "languages.yml")

View File

@ -163,9 +163,11 @@ func parseYaml(file string) (*Heuristics, error) {
// - lookbehind & lookahead // - lookbehind & lookahead
// - named & numbered capturing group/after text matching // - named & numbered capturing group/after text matching
// - backreference // - backreference
// - possessive quantifier
// For referece on supported syntax see https://github.com/google/re2/wiki/Syntax // For referece on supported syntax see https://github.com/google/re2/wiki/Syntax
func isUnsupportedRegexpSyntax(reg string) bool { func isUnsupportedRegexpSyntax(reg string) bool {
return strings.Contains(reg, `(?<`) || strings.Contains(reg, `(?=`) || strings.Contains(reg, `\1`) || return strings.Contains(reg, `(?<`) || strings.Contains(reg, `(?=`) ||
strings.Contains(reg, `\1`) || strings.Contains(reg, `*+`) ||
// See https://github.com/github/linguist/pull/4243#discussion_r246105067 // See https://github.com/github/linguist/pull/4243#discussion_r246105067
(strings.HasPrefix(reg, multilinePrefix+`/`) && strings.HasSuffix(reg, `/`)) (strings.HasPrefix(reg, multilinePrefix+`/`) && strings.HasSuffix(reg, `/`))
} }

View File

@ -106,7 +106,11 @@ func TestTemplateMatcherVars(t *testing.T) {
// render a tmpl // render a tmpl
const contentTmpl = "../assets/content.go.tmpl" const contentTmpl = "../assets/content.go.tmpl"
tmpl, err := template.ParseFiles(contentTmpl) tmpl, err := template.New("content.go.tmpl").Funcs(template.FuncMap{
"stringVal": func(val string) string {
return fmt.Sprintf("`%s`", val)
},
}).ParseFiles(contentTmpl)
require.NoError(t, err) require.NoError(t, err)
buf := bytes.NewBuffer(nil) buf := bytes.NewBuffer(nil)

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
// Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT. // Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d // Extracted from github/linguist commit: 40992ba7f86889f80dfed3ba95e11e1082200bad
package data package data
@ -71,11 +71,13 @@ var LanguagesColor = map[string]string{
"Factor": "#636746", "Factor": "#636746",
"Fancy": "#7b9db4", "Fancy": "#7b9db4",
"Fantom": "#14253c", "Fantom": "#14253c",
"Faust": "#c37240",
"Forth": "#341708", "Forth": "#341708",
"Fortran": "#4d41b1", "Fortran": "#4d41b1",
"FreeMarker": "#0050b2", "FreeMarker": "#0050b2",
"Frege": "#00cafe", "Frege": "#00cafe",
"G-code": "#D08CF2", "G-code": "#D08CF2",
"GAML": "#FFC766",
"GDScript": "#355570", "GDScript": "#355570",
"Game Maker Language": "#71b417", "Game Maker Language": "#71b417",
"Genie": "#fb855d", "Genie": "#fb855d",
@ -96,6 +98,7 @@ var LanguagesColor = map[string]string{
"HolyC": "#ffefaf", "HolyC": "#ffefaf",
"Hy": "#7790B2", "Hy": "#7790B2",
"IDL": "#a3522f", "IDL": "#a3522f",
"IGOR Pro": "#0000cc",
"Idris": "#b30000", "Idris": "#b30000",
"Io": "#a9188d", "Io": "#a9188d",
"Ioke": "#078193", "Ioke": "#078193",
@ -121,6 +124,7 @@ var LanguagesColor = map[string]string{
"Lua": "#000080", "Lua": "#000080",
"MATLAB": "#e16737", "MATLAB": "#e16737",
"MAXScript": "#00a6a6", "MAXScript": "#00a6a6",
"MLIR": "#5EC8DB",
"MQL4": "#62A8D6", "MQL4": "#62A8D6",
"MQL5": "#4A76B8", "MQL5": "#4A76B8",
"MTML": "#b7e1f4", "MTML": "#b7e1f4",
@ -149,8 +153,10 @@ var LanguagesColor = map[string]string{
"Objective-C": "#438eff", "Objective-C": "#438eff",
"Objective-C++": "#6866fb", "Objective-C++": "#6866fb",
"Objective-J": "#ff0c5a", "Objective-J": "#ff0c5a",
"Odin": "#60AFFE",
"Omgrofl": "#cabbff", "Omgrofl": "#cabbff",
"Opal": "#f7ede0", "Opal": "#f7ede0",
"OpenQASM": "#AA70FF",
"Oxygene": "#cdd0e3", "Oxygene": "#cdd0e3",
"Oz": "#fab738", "Oz": "#fab738",
"P4": "#7055b5", "P4": "#7055b5",
@ -163,7 +169,6 @@ var LanguagesColor = map[string]string{
"Pawn": "#dbb284", "Pawn": "#dbb284",
"Pep8": "#C76F5B", "Pep8": "#C76F5B",
"Perl": "#0298c3", "Perl": "#0298c3",
"Perl 6": "#0000fb",
"PigLatin": "#fcd7de", "PigLatin": "#fcd7de",
"Pike": "#005390", "Pike": "#005390",
"PogoScript": "#d80074", "PogoScript": "#d80074",
@ -184,11 +189,14 @@ var LanguagesColor = map[string]string{
"RUNOFF": "#665a4e", "RUNOFF": "#665a4e",
"Racket": "#3c5caa", "Racket": "#3c5caa",
"Ragel": "#9d5200", "Ragel": "#9d5200",
"Raku": "#0000fb",
"Rascal": "#fffaa0", "Rascal": "#fffaa0",
"Reason": "#ff5847",
"Rebol": "#358a5b", "Rebol": "#358a5b",
"Red": "#f50000", "Red": "#f50000",
"Ren'Py": "#ff7f7f", "Ren'Py": "#ff7f7f",
"Ring": "#2D54CB", "Ring": "#2D54CB",
"Riot": "#A71E49",
"Roff": "#ecdebe", "Roff": "#ecdebe",
"Rouge": "#cc0088", "Rouge": "#cc0088",
"Ruby": "#701516", "Ruby": "#701516",
@ -204,12 +212,14 @@ var LanguagesColor = map[string]string{
"Shen": "#120F14", "Shen": "#120F14",
"Slash": "#007eff", "Slash": "#007eff",
"Slice": "#003fa2", "Slice": "#003fa2",
"SmPL": "#c94949",
"Smalltalk": "#596706", "Smalltalk": "#596706",
"Solidity": "#AA6746", "Solidity": "#AA6746",
"SourcePawn": "#5c7611", "SourcePawn": "#5c7611",
"Squirrel": "#800000", "Squirrel": "#800000",
"Stan": "#b2011d", "Stan": "#b2011d",
"Standard ML": "#dc566d", "Standard ML": "#dc566d",
"Starlark": "#76d275",
"SuperCollider": "#46390b", "SuperCollider": "#46390b",
"Swift": "#ffac45", "Swift": "#ffac45",
"SystemVerilog": "#DAE1C2", "SystemVerilog": "#DAE1C2",
@ -220,12 +230,15 @@ var LanguagesColor = map[string]string{
"Turing": "#cf142b", "Turing": "#cf142b",
"TypeScript": "#2b7489", "TypeScript": "#2b7489",
"UnrealScript": "#a54c4d", "UnrealScript": "#a54c4d",
"V": "#5d87bd",
"VBA": "#867db1",
"VBScript": "#15dcdc",
"VCL": "#148AA8", "VCL": "#148AA8",
"VHDL": "#adb2cb", "VHDL": "#adb2cb",
"Vala": "#fbe5cd", "Vala": "#fbe5cd",
"Verilog": "#b2b7f8", "Verilog": "#b2b7f8",
"Vim script": "#199f4b", "Vim script": "#199f4b",
"Visual Basic": "#945db7", "Visual Basic .NET": "#945db7",
"Volt": "#1F1F1F", "Volt": "#1F1F1F",
"Vue": "#2c3e50", "Vue": "#2c3e50",
"WebAssembly": "#04133b", "WebAssembly": "#04133b",
@ -243,6 +256,7 @@ var LanguagesColor = map[string]string{
"Zephir": "#118f9e", "Zephir": "#118f9e",
"Zig": "#ec915c", "Zig": "#ec915c",
"eC": "#913960", "eC": "#913960",
"mIRC Script": "#926059",
"mcfunction": "#E22837", "mcfunction": "#E22837",
"nesC": "#94B0C7", "nesC": "#94B0C7",
"ooc": "#b0b77e", "ooc": "#b0b77e",

View File

@ -1,7 +1,7 @@
// Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT. // Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d // Extracted from github/linguist commit: 40992ba7f86889f80dfed3ba95e11e1082200bad
package data package data
// linguist's commit from which files were generated. // linguist's commit from which files were generated.
var LinguistCommit = "3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d" var LinguistCommit = "40992ba7f86889f80dfed3ba95e11e1082200bad"

View File

@ -1,5 +1,5 @@
// Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT. // Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d // Extracted from github/linguist commit: 40992ba7f86889f80dfed3ba95e11e1082200bad
package data package data
@ -591,6 +591,12 @@ var ContentHeuristics = map[string]*Heuristics{
regexp.MustCompile(`(?m)^(\/\/.+|((import|export)\s+)?(function|int|float|char)\s+((room|repeatedly|on|game)_)?([A-Za-z]+[A-Za-z_0-9]+)\s*[;\(])`), regexp.MustCompile(`(?m)^(\/\/.+|((import|export)\s+)?(function|int|float|char)\s+((room|repeatedly|on|game)_)?([A-Za-z]+[A-Za-z_0-9]+)\s*[;\(])`),
), ),
}, },
".asm": &Heuristics{
rule.Or(
rule.MatchingLanguages("Motorola 68K Assembly"),
regexp.MustCompile(`(?m)(?im)\bmoveq(?:\.l)?\s+#(?:\$-?[0-9a-f]{1,3}|%[0-1]{1,8}|-?[0-9]{1,3}),\s*d[0-7]\b|(?im)^\s*move(?:\.[bwl])?\s+(?:sr|usp),\s*[^\s]+|(?im)^\s*move\.[bwl]\s+.*\b[ad]\d|(?im)^\s*movem\.[bwl]\b|(?im)^\s*move[mp](?:\.[wl])?\b|(?im)^\s*btst\b|(?im)^\s*dbra\b`),
),
},
".asy": &Heuristics{ ".asy": &Heuristics{
rule.Or( rule.Or(
rule.MatchingLanguages("LTspice Symbol"), rule.MatchingLanguages("LTspice Symbol"),
@ -673,6 +679,16 @@ var ContentHeuristics = map[string]*Heuristics{
regexp.MustCompile(`(?m)([\/\\].*:\s+.*\s\\$|: \\$|^[ %]:|^[\w\s\/\\.]+\w+\.\w+\s*:\s+[\w\s\/\\.]+\w+\.\w+)`), regexp.MustCompile(`(?m)([\/\\].*:\s+.*\s\\$|: \\$|^[ %]:|^[\w\s\/\\.]+\w+\.\w+\s*:\s+[\w\s\/\\.]+\w+\.\w+)`),
), ),
}, },
".dsp": &Heuristics{
rule.Or(
rule.MatchingLanguages("Microsoft Developer Studio Project"),
regexp.MustCompile(`(?m)# Microsoft Developer Studio Generated Build File`),
),
rule.Or(
rule.MatchingLanguages("Faust"),
regexp.MustCompile(`(?m)\bprocess\s*[(=]|\b(library|import)\s*\(\s*"|\bdeclare\s+(name|version|author|copyright|license)\s+"`),
),
},
".ecl": &Heuristics{ ".ecl": &Heuristics{
rule.Or( rule.Or(
rule.MatchingLanguages("ECLiPSe"), rule.MatchingLanguages("ECLiPSe"),
@ -772,6 +788,10 @@ var ContentHeuristics = map[string]*Heuristics{
), ),
}, },
".gs": &Heuristics{ ".gs": &Heuristics{
rule.Or(
rule.MatchingLanguages("GLSL"),
regexp.MustCompile(`(?m)^#version\s+[0-9]+\b`),
),
rule.Or( rule.Or(
rule.MatchingLanguages("Gosu"), rule.MatchingLanguages("Gosu"),
regexp.MustCompile(`(?m)^uses java\.`), regexp.MustCompile(`(?m)^uses java\.`),
@ -793,6 +813,16 @@ var ContentHeuristics = map[string]*Heuristics{
regexp.MustCompile(`(?m)<\?hh`), regexp.MustCompile(`(?m)<\?hh`),
), ),
}, },
".i": &Heuristics{
rule.Or(
rule.MatchingLanguages("Motorola 68K Assembly"),
regexp.MustCompile(`(?m)(?im)\bmoveq(?:\.l)?\s+#(?:\$-?[0-9a-f]{1,3}|%[0-1]{1,8}|-?[0-9]{1,3}),\s*d[0-7]\b|(?im)^\s*move(?:\.[bwl])?\s+(?:sr|usp),\s*[^\s]+|(?im)^\s*move\.[bwl]\s+.*\b[ad]\d|(?im)^\s*movem\.[bwl]\b|(?im)^\s*move[mp](?:\.[wl])?\b|(?im)^\s*btst\b|(?im)^\s*dbra\b`),
),
rule.Or(
rule.MatchingLanguages("SWIG"),
regexp.MustCompile(`(?m)^[ \t]*%[a-z_]+\b|^%[{}]$`),
),
},
".ice": &Heuristics{ ".ice": &Heuristics{
rule.Or( rule.Or(
rule.MatchingLanguages("JSON"), rule.MatchingLanguages("JSON"),
@ -803,6 +833,10 @@ var ContentHeuristics = map[string]*Heuristics{
), ),
}, },
".inc": &Heuristics{ ".inc": &Heuristics{
rule.Or(
rule.MatchingLanguages("Motorola 68K Assembly"),
regexp.MustCompile(`(?m)(?im)\bmoveq(?:\.l)?\s+#(?:\$-?[0-9a-f]{1,3}|%[0-1]{1,8}|-?[0-9]{1,3}),\s*d[0-7]\b|(?im)^\s*move(?:\.[bwl])?\s+(?:sr|usp),\s*[^\s]+|(?im)^\s*move\.[bwl]\s+.*\b[ad]\d|(?im)^\s*movem\.[bwl]\b|(?im)^\s*move[mp](?:\.[wl])?\b|(?im)^\s*btst\b|(?im)^\s*dbra\b`),
),
rule.Or( rule.Or(
rule.MatchingLanguages("PHP"), rule.MatchingLanguages("PHP"),
regexp.MustCompile(`(?m)^<\?(?:php)?`), regexp.MustCompile(`(?m)^<\?(?:php)?`),
@ -931,6 +965,12 @@ var ContentHeuristics = map[string]*Heuristics{
rule.MatchingLanguages("Roff"), rule.MatchingLanguages("Roff"),
), ),
}, },
".mask": &Heuristics{
rule.Or(
rule.MatchingLanguages("Unity3d Asset"),
regexp.MustCompile(`(?m)tag:unity3d.com`),
),
},
".md": &Heuristics{ ".md": &Heuristics{
rule.Or( rule.Or(
rule.MatchingLanguages("Markdown"), rule.MatchingLanguages("Markdown"),
@ -1047,6 +1087,25 @@ var ContentHeuristics = map[string]*Heuristics{
rule.MatchingLanguages("NewLisp"), rule.MatchingLanguages("NewLisp"),
), ),
}, },
".odin": &Heuristics{
rule.Or(
rule.MatchingLanguages("Object Data Instance Notation"),
regexp.MustCompile(`(?m)(?:^|<)\s*[A-Za-z0-9_]+\s*=\s*<`),
),
rule.Or(
rule.MatchingLanguages("Odin"),
regexp.MustCompile(`(?m)package\s+\w+|\b(?:im|ex)port\s*"[\w:./]+"|\w+\s*::\s*(?:proc|struct)\s*\(|^\s*//\s`),
),
},
".p": &Heuristics{
rule.Or(
rule.MatchingLanguages("Gnuplot"),
regexp.MustCompile(`(?m)^s?plot\b|^set\s+(term|terminal|out|output|[xy]tics|[xy]label|[xy]range|style)\b`),
),
rule.Always(
rule.MatchingLanguages("OpenEdge ABL"),
),
},
".php": &Heuristics{ ".php": &Heuristics{
rule.Or( rule.Or(
rule.MatchingLanguages("Hack"), rule.MatchingLanguages("Hack"),
@ -1067,17 +1126,26 @@ var ContentHeuristics = map[string]*Heuristics{
regexp.MustCompile(`(?m)\buse\s+(?:strict\b|v?5\.)`), regexp.MustCompile(`(?m)\buse\s+(?:strict\b|v?5\.)`),
), ),
rule.Or( rule.Or(
rule.MatchingLanguages("Perl 6"), rule.MatchingLanguages("Raku"),
regexp.MustCompile(`(?m)^\s*(?:use\s+v6\b|\bmodule\b|\b(?:my\s+)?class\b)`), regexp.MustCompile(`(?m)^\s*(?:use\s+v6\b|\bmodule\b|\b(?:my\s+)?class\b)`),
), ),
}, },
".plist": &Heuristics{
rule.Or(
rule.MatchingLanguages("XML Property List"),
regexp.MustCompile(`(?m)<!DOCTYPE\s+plist`),
),
rule.Always(
rule.MatchingLanguages("OpenStep Property List"),
),
},
".pm": &Heuristics{ ".pm": &Heuristics{
rule.Or( rule.Or(
rule.MatchingLanguages("Perl"), rule.MatchingLanguages("Perl"),
regexp.MustCompile(`(?m)\buse\s+(?:strict\b|v?5\.)`), regexp.MustCompile(`(?m)\buse\s+(?:strict\b|v?5\.)`),
), ),
rule.Or( rule.Or(
rule.MatchingLanguages("Perl 6"), rule.MatchingLanguages("Raku"),
regexp.MustCompile(`(?m)^\s*(?:use\s+v6\b|\bmodule\b|\b(?:my\s+)?class\b)`), regexp.MustCompile(`(?m)^\s*(?:use\s+v6\b|\bmodule\b|\b(?:my\s+)?class\b)`),
), ),
rule.Or( rule.Or(
@ -1105,6 +1173,10 @@ var ContentHeuristics = map[string]*Heuristics{
), ),
}, },
".pro": &Heuristics{ ".pro": &Heuristics{
rule.Or(
rule.MatchingLanguages("Proguard"),
regexp.MustCompile(`(?m)^-(include\b.*\.pro$|keep\b|keepclassmembers\b|keepattributes\b)`),
),
rule.Or( rule.Or(
rule.MatchingLanguages("Prolog"), rule.MatchingLanguages("Prolog"),
regexp.MustCompile(`(?m)^[^\[#]+:-`), regexp.MustCompile(`(?m)^[^\[#]+:-`),
@ -1216,6 +1288,12 @@ var ContentHeuristics = map[string]*Heuristics{
regexp.MustCompile(`(?m)#include|#pragma\s+(rs|version)|__attribute__`), regexp.MustCompile(`(?m)#include|#pragma\s+(rs|version)|__attribute__`),
), ),
}, },
".s": &Heuristics{
rule.Or(
rule.MatchingLanguages("Motorola 68K Assembly"),
regexp.MustCompile(`(?m)(?im)\bmoveq(?:\.l)?\s+#(?:\$-?[0-9a-f]{1,3}|%[0-1]{1,8}|-?[0-9]{1,3}),\s*d[0-7]\b|(?im)^\s*move(?:\.[bwl])?\s+(?:sr|usp),\s*[^\s]+|(?im)^\s*move\.[bwl]\s+.*\b[ad]\d|(?im)^\s*movem\.[bwl]\b|(?im)^\s*move[mp](?:\.[wl])?\b|(?im)^\s*btst\b|(?im)^\s*dbra\b`),
),
},
".sc": &Heuristics{ ".sc": &Heuristics{
rule.Or( rule.Or(
rule.MatchingLanguages("SuperCollider"), rule.MatchingLanguages("SuperCollider"),
@ -1267,7 +1345,7 @@ var ContentHeuristics = map[string]*Heuristics{
regexp.MustCompile(`(?m)\buse\s+(?:strict\b|v?5\.)`), regexp.MustCompile(`(?m)\buse\s+(?:strict\b|v?5\.)`),
), ),
rule.Or( rule.Or(
rule.MatchingLanguages("Perl 6"), rule.MatchingLanguages("Raku"),
regexp.MustCompile(`(?m)^\s*(?:use\s+v6\b|\bmodule\b|\b(?:my\s+)?class\b)`), regexp.MustCompile(`(?m)^\s*(?:use\s+v6\b|\bmodule\b|\b(?:my\s+)?class\b)`),
), ),
rule.Or( rule.Or(
@ -1313,13 +1391,27 @@ var ContentHeuristics = map[string]*Heuristics{
regexp.MustCompile(`(?m)(?i:^\s*<\?xml\s+version)`), regexp.MustCompile(`(?m)(?i:^\s*<\?xml\s+version)`),
), ),
}, },
".v": &Heuristics{
rule.Or(
rule.MatchingLanguages("Coq"),
regexp.MustCompile(`(?m)\(\*.*?\*\)|(?:^|\s)(?:Proof|Qed)\.(?:$|\s)|(?:^|\s)Require[ \t]+Import\s`),
),
rule.Or(
rule.MatchingLanguages("Verilog"),
regexp.MustCompile(`(?m)^[ \t]*module\s+[^\s()]+\s+\#?\(|^[ \t]*`+"`"+`(?:ifdef|timescale)\s|^[ \t]*always[ \t]+@`),
),
rule.Or(
rule.MatchingLanguages("V"),
regexp.MustCompile(`(?m)\$(?:if|else)[ \t]|^[ \t]*fn\s+[^\s()]+\(.*?\).*?\{|^[ \t]*for\s*\{`),
),
},
".vba": &Heuristics{ ".vba": &Heuristics{
rule.Or( rule.Or(
rule.MatchingLanguages("Vim script"), rule.MatchingLanguages("Vim script"),
regexp.MustCompile(`(?m)^UseVimball`), regexp.MustCompile(`(?m)^UseVimball`),
), ),
rule.Always( rule.Always(
rule.MatchingLanguages("Visual Basic"), rule.MatchingLanguages("VBA"),
), ),
}, },
".w": &Heuristics{ ".w": &Heuristics{
@ -1333,6 +1425,10 @@ var ContentHeuristics = map[string]*Heuristics{
), ),
}, },
".x": &Heuristics{ ".x": &Heuristics{
rule.Or(
rule.MatchingLanguages("DirectX 3D File"),
regexp.MustCompile(`(?m)^xof 030(2|3)(?:txt|bin|tzip|bzip)\b`),
),
rule.Or( rule.Or(
rule.MatchingLanguages("RPC"), rule.MatchingLanguages("RPC"),
regexp.MustCompile(`(?m)\b(program|version)\s+\w+\s*{|\bunion\s+\w+\s+switch\s*\(`), regexp.MustCompile(`(?m)\b(program|version)\s+\w+\s*{|\bunion\s+\w+\s+switch\s*\(`),

View File

@ -1,5 +1,5 @@
// Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT. // Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d // Extracted from github/linguist commit: 40992ba7f86889f80dfed3ba95e11e1082200bad
package data package data

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
// Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT. // Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d // Extracted from github/linguist commit: 40992ba7f86889f80dfed3ba95e11e1082200bad
package data package data
@ -23,7 +23,10 @@ var LanguagesByFilename = map[string][]string{
".coffeelintignore": {"Ignore List"}, ".coffeelintignore": {"Ignore List"},
".cproject": {"XML"}, ".cproject": {"XML"},
".cshrc": {"Shell"}, ".cshrc": {"Shell"},
".curlrc": {"cURL Config"},
".cvsignore": {"Ignore List"}, ".cvsignore": {"Ignore List"},
".dir_colors": {"dircolors"},
".dircolors": {"dircolors"},
".dockerignore": {"Ignore List"}, ".dockerignore": {"Ignore List"},
".editorconfig": {"EditorConfig"}, ".editorconfig": {"EditorConfig"},
".emacs": {"Emacs Lisp"}, ".emacs": {"Emacs Lisp"},
@ -43,14 +46,17 @@ var LanguagesByFilename = map[string][]string{
".gvimrc": {"Vim script"}, ".gvimrc": {"Vim script"},
".htaccess": {"ApacheConf"}, ".htaccess": {"ApacheConf"},
".htmlhintrc": {"JSON"}, ".htmlhintrc": {"JSON"},
".inputrc": {"Readline Config"},
".irbrc": {"Ruby"}, ".irbrc": {"Ruby"},
".jscsrc": {"JSON with Comments"}, ".jscsrc": {"JSON with Comments"},
".jshintrc": {"JSON with Comments"}, ".jshintrc": {"JSON with Comments"},
".jslintrc": {"JSON with Comments"}, ".jslintrc": {"JSON with Comments"},
".login": {"Shell"}, ".login": {"Shell"},
".luacheckrc": {"Lua"},
".nanorc": {"nanorc"}, ".nanorc": {"nanorc"},
".nodemonignore": {"Ignore List"}, ".nodemonignore": {"Ignore List"},
".npmignore": {"Ignore List"}, ".npmignore": {"Ignore List"},
".npmrc": {"NPM Config"},
".nvimrc": {"Vim script"}, ".nvimrc": {"Vim script"},
".php": {"PHP"}, ".php": {"PHP"},
".php_cs": {"PHP"}, ".php_cs": {"PHP"},
@ -67,6 +73,7 @@ var LanguagesByFilename = map[string][]string{
".viper": {"Emacs Lisp"}, ".viper": {"Emacs Lisp"},
".vscodeignore": {"Ignore List"}, ".vscodeignore": {"Ignore List"},
".watchmanconfig": {"JSON"}, ".watchmanconfig": {"JSON"},
".wgetrc": {"Wget Config"},
".zlogin": {"Shell"}, ".zlogin": {"Shell"},
".zlogout": {"Shell"}, ".zlogout": {"Shell"},
".zprofile": {"Shell"}, ".zprofile": {"Shell"},
@ -77,9 +84,9 @@ var LanguagesByFilename = map[string][]string{
"App.config": {"XML"}, "App.config": {"XML"},
"Appraisals": {"Ruby"}, "Appraisals": {"Ruby"},
"BSDmakefile": {"Makefile"}, "BSDmakefile": {"Makefile"},
"BUCK": {"Python"}, "BUCK": {"Starlark"},
"BUILD": {"Python"}, "BUILD": {"Starlark"},
"BUILD.bazel": {"Python"}, "BUILD.bazel": {"Starlark"},
"Berksfile": {"Ruby"}, "Berksfile": {"Ruby"},
"Brewfile": {"Ruby"}, "Brewfile": {"Ruby"},
"Buildfile": {"Ruby"}, "Buildfile": {"Ruby"},
@ -91,6 +98,8 @@ var LanguagesByFilename = map[string][]string{
"Capfile": {"Ruby"}, "Capfile": {"Ruby"},
"Cargo.lock": {"TOML"}, "Cargo.lock": {"TOML"},
"Cask": {"Emacs Lisp"}, "Cask": {"Emacs Lisp"},
"DEPS": {"Python"},
"DIR_COLORS": {"dircolors"},
"Dangerfile": {"Ruby"}, "Dangerfile": {"Ruby"},
"Deliverfile": {"Ruby"}, "Deliverfile": {"Ruby"},
"Dockerfile": {"Dockerfile"}, "Dockerfile": {"Dockerfile"},
@ -144,11 +153,14 @@ var LanguagesByFilename = map[string][]string{
"Snapfile": {"Ruby"}, "Snapfile": {"Ruby"},
"Thorfile": {"Ruby"}, "Thorfile": {"Ruby"},
"Vagrantfile": {"Ruby"}, "Vagrantfile": {"Ruby"},
"WORKSPACE": {"Python"}, "WORKSPACE": {"Starlark"},
"Web.Debug.config": {"XML"}, "Web.Debug.config": {"XML"},
"Web.Release.config": {"XML"}, "Web.Release.config": {"XML"},
"Web.config": {"XML"}, "Web.config": {"XML"},
"XCompose": {"XCompose"}, "XCompose": {"XCompose"},
"_curlrc": {"cURL Config"},
"_dir_colors": {"dircolors"},
"_dircolors": {"dircolors"},
"_emacs": {"Emacs Lisp"}, "_emacs": {"Emacs Lisp"},
"_vimrc": {"Vim script"}, "_vimrc": {"Vim script"},
"abbrev_defs": {"Emacs Lisp"}, "abbrev_defs": {"Emacs Lisp"},
@ -173,7 +185,9 @@ var LanguagesByFilename = map[string][]string{
"delete.me": {"Text"}, "delete.me": {"Text"},
"descrip.mmk": {"Module Management System"}, "descrip.mmk": {"Module Management System"},
"descrip.mms": {"Module Management System"}, "descrip.mms": {"Module Management System"},
"dir_colors": {"dircolors"},
"encodings.dir": {"X Font Directory Index"}, "encodings.dir": {"X Font Directory Index"},
"eqnrc": {"Roff"},
"expr-dist": {"R"}, "expr-dist": {"R"},
"firestore.rules": {"Cloud Firestore Security Rules"}, "firestore.rules": {"Cloud Firestore Security Rules"},
"fonts.alias": {"X Font Directory Index"}, "fonts.alias": {"X Font Directory Index"},
@ -189,6 +203,7 @@ var LanguagesByFilename = map[string][]string{
"gvimrc": {"Vim script"}, "gvimrc": {"Vim script"},
"haproxy.cfg": {"HAProxy"}, "haproxy.cfg": {"HAProxy"},
"httpd.conf": {"ApacheConf"}, "httpd.conf": {"ApacheConf"},
"inputrc": {"Readline Config"},
"jsconfig.json": {"JSON with Comments"}, "jsconfig.json": {"JSON with Comments"},
"keep.me": {"Text"}, "keep.me": {"Text"},
"language-configuration.json": {"JSON with Comments"}, "language-configuration.json": {"JSON with Comments"},
@ -212,6 +227,9 @@ var LanguagesByFilename = map[string][]string{
"nim.cfg": {"Nim"}, "nim.cfg": {"Nim"},
"nvimrc": {"Vim script"}, "nvimrc": {"Vim script"},
"owh": {"Tcl"}, "owh": {"Tcl"},
"package.mask": {"Text"},
"package.use.mask": {"Text"},
"package.use.stable.mask": {"Text"},
"packages.config": {"XML"}, "packages.config": {"XML"},
"pom.xml": {"Maven POM"}, "pom.xml": {"Maven POM"},
"profile": {"Shell"}, "profile": {"Shell"},
@ -229,10 +247,15 @@ var LanguagesByFilename = map[string][]string{
"sshd_config": {"SSH Config"}, "sshd_config": {"SSH Config"},
"starfield": {"Tcl"}, "starfield": {"Tcl"},
"test.me": {"Text"}, "test.me": {"Text"},
"troffrc": {"Roff"},
"troffrc-end": {"Roff"},
"tsconfig.json": {"JSON with Comments"}, "tsconfig.json": {"JSON with Comments"},
"use.mask": {"Text"},
"use.stable.mask": {"Text"},
"vimrc": {"Vim script"}, "vimrc": {"Vim script"},
"wscript": {"Python"}, "wscript": {"Python"},
"xcompose": {"XCompose"}, "xcompose": {"XCompose"},
"yarn.lock": {"YAML"},
"zlogin": {"Shell"}, "zlogin": {"Shell"},
"zlogout": {"Shell"}, "zlogout": {"Shell"},
"zprofile": {"Shell"}, "zprofile": {"Shell"},

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
// Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT. // Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d // Extracted from github/linguist commit: 40992ba7f86889f80dfed3ba95e11e1082200bad
package data package data
@ -20,6 +20,7 @@ var LanguagesByInterpreter = map[string][]string{
"coffee": {"CoffeeScript"}, "coffee": {"CoffeeScript"},
"cperl": {"Perl"}, "cperl": {"Perl"},
"crystal": {"Crystal"}, "crystal": {"Crystal"},
"csh": {"Tcsh"},
"csi": {"Scheme"}, "csi": {"Scheme"},
"cvc4": {"SMT"}, "cvc4": {"SMT"},
"cwl-runner": {"Common Workflow Language"}, "cwl-runner": {"Common Workflow Language"},
@ -36,6 +37,7 @@ var LanguagesByInterpreter = map[string][]string{
"gawk": {"Awk"}, "gawk": {"Awk"},
"gerbv": {"Gerber Image"}, "gerbv": {"Gerber Image"},
"gerbview": {"Gerber Image"}, "gerbview": {"Gerber Image"},
"gjs": {"JavaScript"},
"gn": {"GN"}, "gn": {"GN"},
"gnuplot": {"Gnuplot"}, "gnuplot": {"Gnuplot"},
"gosh": {"Scheme"}, "gosh": {"Scheme"},
@ -57,6 +59,7 @@ var LanguagesByInterpreter = map[string][]string{
"lua": {"Lua", "Terra"}, "lua": {"Lua", "Terra"},
"macruby": {"Ruby"}, "macruby": {"Ruby"},
"make": {"Makefile"}, "make": {"Makefile"},
"makeinfo": {"Texinfo"},
"mathsat5": {"SMT"}, "mathsat5": {"SMT"},
"mawk": {"Awk"}, "mawk": {"Awk"},
"minised": {"sed"}, "minised": {"sed"},
@ -77,7 +80,7 @@ var LanguagesByInterpreter = map[string][]string{
"parrot": {"Parrot Assembly", "Parrot Internal Representation"}, "parrot": {"Parrot Assembly", "Parrot Internal Representation"},
"pdksh": {"Shell"}, "pdksh": {"Shell"},
"perl": {"Perl", "Pod"}, "perl": {"Perl", "Pod"},
"perl6": {"Perl 6", "Pod 6"}, "perl6": {"Pod 6", "Raku"},
"php": {"PHP"}, "php": {"PHP"},
"picolisp": {"PicoLisp"}, "picolisp": {"PicoLisp"},
"pike": {"Pike"}, "pike": {"Pike"},
@ -86,10 +89,13 @@ var LanguagesByInterpreter = map[string][]string{
"python": {"Python"}, "python": {"Python"},
"python2": {"Python"}, "python2": {"Python"},
"python3": {"Python"}, "python3": {"Python"},
"qjs": {"JavaScript"},
"qmake": {"QMake"}, "qmake": {"QMake"},
"r6rs": {"Scheme"}, "r6rs": {"Scheme"},
"racket": {"Racket"}, "racket": {"Racket"},
"rake": {"Ruby"}, "rake": {"Ruby"},
"raku": {"Raku"},
"rakudo": {"Raku"},
"rbx": {"Ruby"}, "rbx": {"Ruby"},
"rc": {"Shell"}, "rc": {"Shell"},
"regina": {"REXX"}, "regina": {"REXX"},
@ -112,6 +118,7 @@ var LanguagesByInterpreter = map[string][]string{
"swipl": {"Prolog"}, "swipl": {"Prolog"},
"tcc": {"C"}, "tcc": {"C"},
"tclsh": {"Tcl"}, "tclsh": {"Tcl"},
"tcsh": {"Tcsh"},
"ts-node": {"TypeScript"}, "ts-node": {"TypeScript"},
"v8": {"JavaScript"}, "v8": {"JavaScript"},
"v8-shell": {"JavaScript"}, "v8-shell": {"JavaScript"},

View File

@ -1,5 +1,5 @@
// Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT. // Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d // Extracted from github/linguist commit: 40992ba7f86889f80dfed3ba95e11e1082200bad
package data package data
@ -13,6 +13,7 @@ var LanguagesMime = map[string]string{
"Ant Build System": "application/xml", "Ant Build System": "application/xml",
"Apex": "text/x-java", "Apex": "text/x-java",
"Asymptote": "text/x-kotlin", "Asymptote": "text/x-kotlin",
"BibTeX": "text/x-stex",
"Brainfuck": "text/x-brainfuck", "Brainfuck": "text/x-brainfuck",
"C": "text/x-csrc", "C": "text/x-csrc",
"C#": "text/x-csharp", "C#": "text/x-csharp",
@ -50,7 +51,7 @@ var LanguagesMime = map[string]string{
"Easybuild": "text/x-python", "Easybuild": "text/x-python",
"Ecere Projects": "application/json", "Ecere Projects": "application/json",
"EditorConfig": "text/x-properties", "EditorConfig": "text/x-properties",
"Edje Data Collection": "application/json", "Edje Data Collection": "text/x-c++src",
"Eiffel": "text/x-eiffel", "Eiffel": "text/x-eiffel",
"Elm": "text/x-elm", "Elm": "text/x-elm",
"Emacs Lisp": "text/x-common-lisp", "Emacs Lisp": "text/x-common-lisp",
@ -146,7 +147,6 @@ var LanguagesMime = map[string]string{
"PLpgSQL": "text/x-sql", "PLpgSQL": "text/x-sql",
"Pascal": "text/x-pascal", "Pascal": "text/x-pascal",
"Perl": "text/x-perl", "Perl": "text/x-perl",
"Perl 6": "text/x-perl",
"Pic": "text/troff", "Pic": "text/troff",
"Pod": "text/x-perl", "Pod": "text/x-perl",
"PowerShell": "application/x-powershell", "PowerShell": "application/x-powershell",
@ -161,6 +161,7 @@ var LanguagesMime = map[string]string{
"RHTML": "application/x-erb", "RHTML": "application/x-erb",
"RMarkdown": "text/x-gfm", "RMarkdown": "text/x-gfm",
"RPM Spec": "text/x-rpm-spec", "RPM Spec": "text/x-rpm-spec",
"Raku": "text/x-perl",
"Reason": "text/x-rustsrc", "Reason": "text/x-rustsrc",
"Roff": "text/troff", "Roff": "text/troff",
"Roff Manpage": "text/troff", "Roff Manpage": "text/troff",
@ -174,6 +175,7 @@ var LanguagesMime = map[string]string{
"SQLPL": "text/x-sql", "SQLPL": "text/x-sql",
"SRecode Template": "text/x-common-lisp", "SRecode Template": "text/x-common-lisp",
"SVG": "text/xml", "SVG": "text/xml",
"SWIG": "text/x-c++src",
"Sage": "text/x-python", "Sage": "text/x-python",
"SaltStack": "text/x-yaml", "SaltStack": "text/x-yaml",
"Sass": "text/x-sass", "Sass": "text/x-sass",
@ -186,6 +188,7 @@ var LanguagesMime = map[string]string{
"Smarty": "text/x-smarty", "Smarty": "text/x-smarty",
"Squirrel": "text/x-c++src", "Squirrel": "text/x-c++src",
"Standard ML": "text/x-ocaml", "Standard ML": "text/x-ocaml",
"Starlark": "text/x-python",
"Svelte": "text/html", "Svelte": "text/html",
"Swift": "text/x-swift", "Swift": "text/x-swift",
"SystemVerilog": "text/x-systemverilog", "SystemVerilog": "text/x-systemverilog",
@ -203,9 +206,12 @@ var LanguagesMime = map[string]string{
"Unity3D Asset": "text/x-yaml", "Unity3D Asset": "text/x-yaml",
"Uno": "text/x-csharp", "Uno": "text/x-csharp",
"UnrealScript": "text/x-java", "UnrealScript": "text/x-java",
"V": "text/x-go",
"VBA": "text/x-vb",
"VBScript": "text/vbscript",
"VHDL": "text/x-vhdl", "VHDL": "text/x-vhdl",
"Verilog": "text/x-verilog", "Verilog": "text/x-verilog",
"Visual Basic": "text/x-vb", "Visual Basic .NET": "text/x-vb",
"Volt": "text/x-d", "Volt": "text/x-d",
"WebAssembly": "text/x-common-lisp", "WebAssembly": "text/x-common-lisp",
"WebIDL": "text/x-webidl", "WebIDL": "text/x-webidl",
@ -214,6 +220,7 @@ var LanguagesMime = map[string]string{
"X PixMap": "text/x-csrc", "X PixMap": "text/x-csrc",
"XC": "text/x-csrc", "XC": "text/x-csrc",
"XML": "text/xml", "XML": "text/xml",
"XML Property List": "text/xml",
"XPages": "text/xml", "XPages": "text/xml",
"XProc": "text/xml", "XProc": "text/xml",
"XQuery": "application/xquery", "XQuery": "application/xquery",

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
// Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT. // Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d // Extracted from github/linguist commit: 40992ba7f86889f80dfed3ba95e11e1082200bad
package data package data
@ -19,8 +19,11 @@ var VendorMatchers = substring.Or(
substring.Regexp(`(^|/)ltsugar.m4`), substring.Regexp(`(^|/)ltsugar.m4`),
substring.Regexp(`(^|/)ltversion.m4`), substring.Regexp(`(^|/)ltversion.m4`),
substring.Regexp(`(^|/)lt~obsolete.m4`), substring.Regexp(`(^|/)lt~obsolete.m4`),
substring.Regexp(`dotnet-install\.(ps1|sh)$`),
substring.Regexp(`cpplint.py`), substring.Regexp(`cpplint.py`),
substring.Regexp(`node_modules/`), substring.Regexp(`node_modules/`),
substring.Regexp(`(^|/)\.yarn/releases/`),
substring.Regexp(`(^|/)_esy$`),
substring.Regexp(`bower_components/`), substring.Regexp(`bower_components/`),
substring.Regexp(`^rebar$`), substring.Regexp(`^rebar$`),
substring.Regexp(`erlang.mk`), substring.Regexp(`erlang.mk`),