Merge commit 'f955c625aded244864e83a872b396868a490dbc5' as 'go-enry'

This commit is contained in:
2024-09-04 16:33:41 -03:00
192 changed files with 528500 additions and 0 deletions

1134
go-enry/data/alias.go Normal file

File diff suppressed because it is too large Load Diff

601
go-enry/data/colors.go Normal file
View File

@ -0,0 +1,601 @@
// Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 42fd3c2514375fc6ad281552368edd3fb9f6ee7f
package data
var LanguagesColor = map[string]string{
"1C Enterprise": "#814CCC",
"2-Dimensional Array": "#38761D",
"4D": "#004289",
"ABAP": "#E8274B",
"ABAP CDS": "#555e25",
"AGS Script": "#B9D9FF",
"AIDL": "#34EB6B",
"AL": "#3AA2B5",
"AMPL": "#E6EFBB",
"ANTLR": "#9DC3FF",
"API Blueprint": "#2ACCA8",
"APL": "#5A8164",
"ASP.NET": "#9400ff",
"ATS": "#1ac620",
"ActionScript": "#882B0F",
"Ada": "#02f88c",
"Adblock Filter List": "#800000",
"Adobe Font Metrics": "#fa0f00",
"Agda": "#315665",
"Alloy": "#64C800",
"Alpine Abuild": "#0D597F",
"Altium Designer": "#A89663",
"AngelScript": "#C7D7DC",
"Ant Build System": "#A9157E",
"Antlers": "#ff269e",
"ApacheConf": "#d12127",
"Apex": "#1797c0",
"Apollo Guidance Computer": "#0B3D91",
"AppleScript": "#101F1F",
"Arc": "#aa2afe",
"AsciiDoc": "#73a0c5",
"AspectJ": "#a957b0",
"Assembly": "#6E4C13",
"Astro": "#ff5a03",
"Asymptote": "#ff0000",
"Augeas": "#9CC134",
"AutoHotkey": "#6594b9",
"AutoIt": "#1C3552",
"Avro IDL": "#0040FF",
"Awk": "#c30e9b",
"BASIC": "#ff0000",
"BQN": "#2b7067",
"Ballerina": "#FF5000",
"Batchfile": "#C1F12E",
"Beef": "#a52f4e",
"Berry": "#15A13C",
"BibTeX": "#778899",
"Bicep": "#519aba",
"Bikeshed": "#5562ac",
"Bison": "#6A463F",
"BitBake": "#00bce4",
"Blade": "#f7523f",
"BlitzBasic": "#00FFAE",
"BlitzMax": "#cd6400",
"Bluespec": "#12223c",
"Bluespec BH": "#12223c",
"Boo": "#d4bec1",
"Boogie": "#c80fa0",
"Brainfuck": "#2F2530",
"BrighterScript": "#66AABB",
"Brightscript": "#662D91",
"Browserslist": "#ffd539",
"C": "#555555",
"C#": "#178600",
"C++": "#f34b7d",
"CAP CDS": "#0092d1",
"CLIPS": "#00A300",
"CMake": "#DA3434",
"COLLADA": "#F1A42B",
"CSON": "#244776",
"CSS": "#563d7c",
"CSV": "#237346",
"CUE": "#5886E1",
"CWeb": "#00007a",
"Cabal Config": "#483465",
"Caddyfile": "#22b638",
"Cadence": "#00ef8b",
"Cairo": "#ff4a48",
"CameLIGO": "#3be133",
"Cap'n Proto": "#c42727",
"Ceylon": "#dfa535",
"Chapel": "#8dc63f",
"ChucK": "#3f8000",
"Circom": "#707575",
"Cirru": "#ccccff",
"Clarion": "#db901e",
"Clarity": "#5546ff",
"Classic ASP": "#6a40fd",
"Clean": "#3F85AF",
"Click": "#E4E6F3",
"Clojure": "#db5855",
"Closure Templates": "#0d948f",
"Cloud Firestore Security Rules": "#FFA000",
"CodeQL": "#140f46",
"CoffeeScript": "#244776",
"ColdFusion": "#ed2cd6",
"ColdFusion CFC": "#ed2cd6",
"Common Lisp": "#3fb68b",
"Common Workflow Language": "#B5314C",
"Component Pascal": "#B0CE4E",
"Coq": "#d0b68c",
"Crystal": "#000100",
"Csound": "#1a1a1a",
"Csound Document": "#1a1a1a",
"Csound Score": "#1a1a1a",
"Cuda": "#3A4E3A",
"Curry": "#531242",
"Cypher": "#34c0eb",
"Cython": "#fedf5b",
"D": "#ba595e",
"D2": "#526ee8",
"DM": "#447265",
"Dafny": "#FFEC25",
"Darcs Patch": "#8eff23",
"Dart": "#00B4AB",
"DataWeave": "#003a52",
"Debian Package Control File": "#D70751",
"DenizenScript": "#FBEE96",
"Dhall": "#dfafff",
"DirectX 3D File": "#aace60",
"Dockerfile": "#384d54",
"Dogescript": "#cca760",
"Dotenv": "#e5d559",
"Dylan": "#6c616e",
"E": "#ccce35",
"ECL": "#8a1267",
"ECLiPSe": "#001d9d",
"EJS": "#a91e50",
"EQ": "#a78649",
"Earthly": "#2af0ff",
"Easybuild": "#069406",
"Ecere Projects": "#913960",
"Ecmarkup": "#eb8131",
"Edge": "#0dffe0",
"EdgeQL": "#31A7FF",
"EditorConfig": "#fff1f2",
"Eiffel": "#4d6977",
"Elixir": "#6e4a7e",
"Elm": "#60B5CC",
"Elvish": "#55BB55",
"Elvish Transcript": "#55BB55",
"Emacs Lisp": "#c065db",
"EmberScript": "#FFF4F3",
"Erlang": "#B83998",
"Euphoria": "#FF790B",
"F#": "#b845fc",
"F*": "#572e30",
"FIGlet Font": "#FFDDBB",
"FIRRTL": "#2f632f",
"FLUX": "#88ccff",
"Factor": "#636746",
"Fancy": "#7b9db4",
"Fantom": "#14253c",
"Faust": "#c37240",
"Fennel": "#fff3d7",
"Filebench WML": "#F6B900",
"Fluent": "#ffcc33",
"Forth": "#341708",
"Fortran": "#4d41b1",
"Fortran Free Form": "#4d41b1",
"FreeBasic": "#141AC9",
"FreeMarker": "#0050b2",
"Frege": "#00cafe",
"Futhark": "#5f021f",
"G-code": "#D08CF2",
"GAML": "#FFC766",
"GAMS": "#f49a22",
"GAP": "#0000cc",
"GCC Machine Description": "#FFCFAB",
"GDScript": "#355570",
"GEDCOM": "#003058",
"GLSL": "#5686a5",
"GSC": "#FF6800",
"Game Maker Language": "#71b417",
"Gemfile.lock": "#701516",
"Gemini": "#ff6900",
"Genero 4gl": "#63408e",
"Genero per": "#d8df39",
"Genie": "#fb855d",
"Genshi": "#951531",
"Gentoo Ebuild": "#9400ff",
"Gentoo Eclass": "#9400ff",
"Gerber Image": "#d20b00",
"Gherkin": "#5B2063",
"Git Attributes": "#F44D27",
"Git Config": "#F44D27",
"Git Revision List": "#F44D27",
"Gleam": "#ffaff3",
"Glimmer JS": "#F5835F",
"Glimmer TS": "#3178c6",
"Glyph": "#c1ac7f",
"Gnuplot": "#f0a9f0",
"Go": "#00ADD8",
"Go Checksums": "#00ADD8",
"Go Module": "#00ADD8",
"Go Workspace": "#00ADD8",
"Godot Resource": "#355570",
"Golo": "#88562A",
"Gosu": "#82937f",
"Grace": "#615f8b",
"Gradle": "#02303a",
"Gradle Kotlin DSL": "#02303a",
"Grammatical Framework": "#ff0000",
"GraphQL": "#e10098",
"Graphviz (DOT)": "#2596be",
"Groovy": "#4298b8",
"Groovy Server Pages": "#4298b8",
"HAProxy": "#106da9",
"HCL": "#844FBA",
"HLSL": "#aace60",
"HOCON": "#9ff8ee",
"HTML": "#e34c26",
"HTML+ECR": "#2e1052",
"HTML+EEX": "#6e4a7e",
"HTML+ERB": "#701516",
"HTML+PHP": "#4f5d95",
"HTML+Razor": "#512be4",
"HTTP": "#005C9C",
"HXML": "#f68712",
"Hack": "#878787",
"Haml": "#ece2a9",
"Handlebars": "#f7931e",
"Harbour": "#0e60e3",
"Haskell": "#5e5086",
"Haxe": "#df7900",
"HiveQL": "#dce200",
"HolyC": "#ffefaf",
"Hosts File": "#308888",
"Hy": "#7790B2",
"IDL": "#a3522f",
"IGOR Pro": "#0000cc",
"INI": "#d1dbe0",
"Idris": "#b30000",
"Ignore List": "#000000",
"ImageJ Macro": "#99AAFF",
"Imba": "#16cec6",
"Inno Setup": "#264b99",
"Io": "#a9188d",
"Ioke": "#078193",
"Isabelle": "#FEFE00",
"Isabelle ROOT": "#FEFE00",
"J": "#9EEDFF",
"JAR Manifest": "#b07219",
"JCL": "#d90e09",
"JFlex": "#DBCA00",
"JSON": "#292929",
"JSON with Comments": "#292929",
"JSON5": "#267CB9",
"JSONLD": "#0c479c",
"JSONiq": "#40d47e",
"Janet": "#0886a5",
"Jasmin": "#d03600",
"Java": "#b07219",
"Java Properties": "#2A6277",
"Java Server Pages": "#2A6277",
"JavaScript": "#f1e05a",
"JavaScript+ERB": "#f1e05a",
"Jest Snapshot": "#15c213",
"JetBrains MPS": "#21D789",
"Jinja": "#a52a22",
"Jison": "#56b3cb",
"Jison Lex": "#56b3cb",
"Jolie": "#843179",
"Jsonnet": "#0064bd",
"Julia": "#a270ba",
"Julia REPL": "#a270ba",
"Jupyter Notebook": "#DA5B0B",
"Just": "#384d54",
"KRL": "#28430A",
"Kaitai Struct": "#773b37",
"KakouneScript": "#6f8042",
"KerboScript": "#41adf0",
"KiCad Layout": "#2f4aab",
"KiCad Legacy Layout": "#2f4aab",
"KiCad Schematic": "#2f4aab",
"Kotlin": "#A97BFF",
"LFE": "#4C3023",
"LLVM": "#185619",
"LOLCODE": "#cc9900",
"LSL": "#3d9970",
"LabVIEW": "#fede06",
"Lark": "#2980B9",
"Lasso": "#999999",
"Latte": "#f2a542",
"Less": "#1d365d",
"Lex": "#DBCA00",
"LigoLANG": "#0e74ff",
"LilyPond": "#9ccc7c",
"Liquid": "#67b8de",
"Literate Agda": "#315665",
"Literate CoffeeScript": "#244776",
"Literate Haskell": "#5e5086",
"LiveScript": "#499886",
"Logtalk": "#295b9a",
"LookML": "#652B81",
"Lua": "#000080",
"Luau": "#00A2FF",
"MATLAB": "#e16737",
"MAXScript": "#00a6a6",
"MDX": "#fcb32c",
"MLIR": "#5EC8DB",
"MQL4": "#62A8D6",
"MQL5": "#4A76B8",
"MTML": "#b7e1f4",
"Macaulay2": "#d8ffff",
"Makefile": "#427819",
"Mako": "#7e858d",
"Markdown": "#083fa1",
"Marko": "#42bff2",
"Mask": "#f97732",
"Mathematica": "#dd1100",
"Max": "#c4a79c",
"Mercury": "#ff2b2b",
"Mermaid": "#ff3670",
"Meson": "#007800",
"Metal": "#8f14e9",
"MiniYAML": "#ff1111",
"Mint": "#02b046",
"Mirah": "#c7a938",
"Modelica": "#de1d31",
"Modula-2": "#10253f",
"Modula-3": "#223388",
"Mojo": "#ff4c1f",
"Monkey C": "#8D6747",
"MoonScript": "#ff4585",
"Motoko": "#fbb03b",
"Motorola 68K Assembly": "#005daa",
"Move": "#4a137a",
"Mustache": "#724b3b",
"NCL": "#28431f",
"NMODL": "#00356B",
"NPM Config": "#cb3837",
"NWScript": "#111522",
"Nasal": "#1d2c4e",
"Nearley": "#990000",
"Nemerle": "#3d3c6e",
"NetLinx": "#0aa0ff",
"NetLinx+ERB": "#747faa",
"NetLogo": "#ff6375",
"NewLisp": "#87AED7",
"Nextflow": "#3ac486",
"Nginx": "#009639",
"Nim": "#ffc200",
"Nit": "#009917",
"Nix": "#7e7eff",
"Nu": "#c9df40",
"NumPy": "#9C8AF9",
"Nunjucks": "#3d8137",
"Nushell": "#4E9906",
"OASv2-json": "#85ea2d",
"OASv2-yaml": "#85ea2d",
"OASv3-json": "#85ea2d",
"OASv3-yaml": "#85ea2d",
"OCaml": "#ef7a08",
"ObjectScript": "#424893",
"Objective-C": "#438eff",
"Objective-C++": "#6866fb",
"Objective-J": "#ff0c5a",
"Odin": "#60AFFE",
"Omgrofl": "#cabbff",
"Opal": "#f7ede0",
"Open Policy Agent": "#7d9199",
"OpenAPI Specification v2": "#85ea2d",
"OpenAPI Specification v3": "#85ea2d",
"OpenCL": "#ed2e2d",
"OpenEdge ABL": "#5ce600",
"OpenQASM": "#AA70FF",
"OpenSCAD": "#e5cd45",
"Option List": "#476732",
"Org": "#77aa99",
"Oxygene": "#cdd0e3",
"Oz": "#fab738",
"P4": "#7055b5",
"PDDL": "#0d00ff",
"PEG.js": "#234d6b",
"PHP": "#4F5D95",
"PLSQL": "#dad8d8",
"PLpgSQL": "#336790",
"POV-Ray SDL": "#6bac65",
"Pact": "#F7A8B8",
"Pan": "#cc0000",
"Papyrus": "#6600cc",
"Parrot": "#f3ca0a",
"Pascal": "#E3F171",
"Pawn": "#dbb284",
"Pep8": "#C76F5B",
"Perl": "#0298c3",
"PicoLisp": "#6067af",
"PigLatin": "#fcd7de",
"Pike": "#005390",
"Pip Requirements": "#FFD343",
"Pkl": "#6b9543",
"PlantUML": "#fbbd16",
"PogoScript": "#d80074",
"Polar": "#ae81ff",
"Portugol": "#f8bd00",
"PostCSS": "#dc3a0c",
"PostScript": "#da291c",
"PowerBuilder": "#8f0f8d",
"PowerShell": "#012456",
"Praat": "#c8506d",
"Prisma": "#0c344b",
"Processing": "#0096D8",
"Procfile": "#3B2F63",
"Prolog": "#74283c",
"Promela": "#de0000",
"Propeller Spin": "#7fa2a7",
"Pug": "#a86454",
"Puppet": "#302B6D",
"PureBasic": "#5a6986",
"PureScript": "#1D222D",
"Pyret": "#ee1e10",
"Python": "#3572A5",
"Python console": "#3572A5",
"Python traceback": "#3572A5",
"Q#": "#fed659",
"QML": "#44a51c",
"Qt Script": "#00b841",
"Quake": "#882233",
"R": "#198CE7",
"RAML": "#77d9fb",
"RBS": "#701516",
"RDoc": "#701516",
"REXX": "#d90e09",
"RMarkdown": "#198ce7",
"RON": "#a62c00",
"RPGLE": "#2BDE21",
"RUNOFF": "#665a4e",
"Racket": "#3c5caa",
"Ragel": "#9d5200",
"Raku": "#0000fb",
"Rascal": "#fffaa0",
"ReScript": "#ed5051",
"Reason": "#ff5847",
"ReasonLIGO": "#ff5847",
"Rebol": "#358a5b",
"Record Jar": "#0673ba",
"Red": "#f50000",
"Regular Expression": "#009a00",
"Ren'Py": "#ff7f7f",
"Rez": "#FFDAB3",
"Ring": "#2D54CB",
"Riot": "#A71E49",
"RobotFramework": "#00c0b5",
"Roc": "#7c38f5",
"Roff": "#ecdebe",
"Roff Manpage": "#ecdebe",
"Rouge": "#cc0088",
"RouterOS Script": "#DE3941",
"Ruby": "#701516",
"Rust": "#dea584",
"SAS": "#B34936",
"SCSS": "#c6538c",
"SPARQL": "#0C4597",
"SQF": "#3F3F3F",
"SQL": "#e38c00",
"SQLPL": "#e38c00",
"SRecode Template": "#348a34",
"STL": "#373b5e",
"SVG": "#ff9900",
"SaltStack": "#646464",
"Sass": "#a53b70",
"Scala": "#c22d40",
"Scaml": "#bd181a",
"Scenic": "#fdc700",
"Scheme": "#1e4aec",
"Scilab": "#ca0f21",
"Self": "#0579aa",
"ShaderLab": "#222c37",
"Shell": "#89e051",
"ShellCheck Config": "#cecfcb",
"Shen": "#120F14",
"Simple File Verification": "#C9BFED",
"Singularity": "#64E6AD",
"Slash": "#007eff",
"Slice": "#003fa2",
"Slim": "#2b2b2b",
"Slint": "#2379F4",
"SmPL": "#c94949",
"Smalltalk": "#596706",
"Smarty": "#f0c040",
"Smithy": "#c44536",
"Snakemake": "#419179",
"Solidity": "#AA6746",
"SourcePawn": "#f69e1d",
"Squirrel": "#800000",
"Stan": "#b2011d",
"Standard ML": "#dc566d",
"Starlark": "#76d275",
"Stata": "#1a5f91",
"StringTemplate": "#3fb34f",
"Stylus": "#ff6347",
"SubRip Text": "#9e0101",
"SugarSS": "#2fcc9f",
"SuperCollider": "#46390b",
"Svelte": "#ff3e00",
"Sway": "#00F58C",
"Sweave": "#198ce7",
"Swift": "#F05138",
"SystemVerilog": "#DAE1C2",
"TI Program": "#A0AA87",
"TL-Verilog": "#C40023",
"TLA": "#4b0079",
"TOML": "#9c4221",
"TSQL": "#e38c00",
"TSV": "#237346",
"TSX": "#3178c6",
"TXL": "#0178b8",
"Talon": "#333333",
"Tcl": "#e4cc98",
"TeX": "#3D6117",
"Terra": "#00004c",
"Terraform Template": "#7b42bb",
"TextGrid": "#c8506d",
"TextMate Properties": "#df66e4",
"Textile": "#ffe7ac",
"Thrift": "#D12127",
"Toit": "#c2c9fb",
"Turing": "#cf142b",
"Twig": "#c1d026",
"TypeScript": "#3178c6",
"Typst": "#239dad",
"Unified Parallel C": "#4e3617",
"Unity3D Asset": "#222c37",
"Uno": "#9933cc",
"UnrealScript": "#a54c4d",
"UrWeb": "#ccccee",
"V": "#4f87c4",
"VBA": "#867db1",
"VBScript": "#15dcdc",
"VCL": "#148AA8",
"VHDL": "#adb2cb",
"Vala": "#a56de2",
"Valve Data Format": "#f26025",
"Velocity Template Language": "#507cff",
"Verilog": "#b2b7f8",
"Vim Help File": "#199f4b",
"Vim Script": "#199f4b",
"Vim Snippet": "#199f4b",
"Visual Basic .NET": "#945db7",
"Visual Basic 6.0": "#2c6353",
"Volt": "#1F1F1F",
"Vue": "#41b883",
"Vyper": "#2980b9",
"WDL": "#42f1f4",
"WGSL": "#1a5e9a",
"Web Ontology Language": "#5b70bd",
"WebAssembly": "#04133b",
"WebAssembly Interface Type": "#6250e7",
"Whiley": "#d5c397",
"Wikitext": "#fc5757",
"Windows Registry Entries": "#52d5ff",
"Witcher Script": "#ff0000",
"Wollok": "#a23738",
"World of Warcraft Addon Data": "#f7e43f",
"Wren": "#383838",
"X10": "#4B6BEF",
"XC": "#99DA07",
"XML": "#0060ac",
"XML Property List": "#0060ac",
"XQuery": "#5232e7",
"XSLT": "#EB8CEB",
"Xojo": "#81bd41",
"Xonsh": "#285EEF",
"Xtend": "#24255d",
"YAML": "#cb171e",
"YARA": "#220000",
"YASnippet": "#32AB90",
"Yacc": "#4B6C4B",
"Yul": "#794932",
"ZAP": "#0d665e",
"ZIL": "#dc75e5",
"ZenScript": "#00BCD1",
"Zephir": "#118f9e",
"Zig": "#ec915c",
"Zimpl": "#d67711",
"crontab": "#ead7ac",
"eC": "#913960",
"fish": "#4aae47",
"hoon": "#00b171",
"jq": "#c7254e",
"kvlang": "#1da6e0",
"mIRC Script": "#3d57c3",
"mcfunction": "#E22837",
"mupad": "#244963",
"nanorc": "#2d004d",
"nesC": "#94B0C7",
"ooc": "#b0b77e",
"q": "#0040cd",
"reStructuredText": "#141414",
"sed": "#64b970",
"templ": "#66D0DD",
"wisp": "#7582D1",
"xBase": "#403a40",
}

7
go-enry/data/commit.go Normal file
View File

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

1972
go-enry/data/content.go Normal file

File diff suppressed because it is too large Load Diff

3
go-enry/data/doc.go Normal file
View File

@ -0,0 +1,3 @@
// Package data contains only auto-generated data-structures for all the language
// identification strategies from the Linguist project sources.
package data

View File

@ -0,0 +1,27 @@
// Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 42fd3c2514375fc6ad281552368edd3fb9f6ee7f
package data
import "github.com/go-enry/go-enry/v2/regex"
var DocumentationMatchers = []regex.EnryRegexp{
regex.MustCompile(`^[Dd]ocs?/`),
regex.MustCompile(`(^|/)[Dd]ocumentation/`),
regex.MustCompile(`(^|/)[Gg]roovydoc/`),
regex.MustCompile(`(^|/)[Jj]avadoc/`),
regex.MustCompile(`^[Mm]an/`),
regex.MustCompile(`^[Ee]xamples/`),
regex.MustCompile(`^[Dd]emos?/`),
regex.MustCompile(`(^|/)inst/doc/`),
regex.MustCompile(`(^|/)CITATION(\.cff|(S)?(\.(bib|md))?)$`),
regex.MustCompile(`(^|/)CHANGE(S|LOG)?(\.|$)`),
regex.MustCompile(`(^|/)CONTRIBUTING(\.|$)`),
regex.MustCompile(`(^|/)COPYING(\.|$)`),
regex.MustCompile(`(^|/)INSTALL(\.|$)`),
regex.MustCompile(`(^|/)LICEN[CS]E(\.|$)`),
regex.MustCompile(`(^|/)[Ll]icen[cs]e(\.|$)`),
regex.MustCompile(`(^|/)README(\.|$)`),
regex.MustCompile(`(^|/)[Rr]eadme(\.|$)`),
regex.MustCompile(`^[Ss]amples?/`),
}

2062
go-enry/data/extension.go Normal file

File diff suppressed because it is too large Load Diff

376
go-enry/data/filename.go Normal file
View File

@ -0,0 +1,376 @@
// Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 42fd3c2514375fc6ad281552368edd3fb9f6ee7f
package data
var LanguagesByFilename = map[string][]string{
".JUSTFILE": {"Just"},
".Justfile": {"Just"},
".Rprofile": {"R"},
".XCompose": {"XCompose"},
".abbrev_defs": {"Emacs Lisp"},
".ackrc": {"Option List"},
".all-contributorsrc": {"JSON"},
".arcconfig": {"JSON"},
".atomignore": {"Ignore List"},
".auto-changelog": {"JSON"},
".babelignore": {"Ignore List"},
".babelrc": {"JSON with Comments"},
".bash_aliases": {"Shell"},
".bash_functions": {"Shell"},
".bash_history": {"Shell"},
".bash_logout": {"Shell"},
".bash_profile": {"Shell"},
".bashrc": {"Shell"},
".browserslistrc": {"Browserslist"},
".bzrignore": {"Ignore List"},
".c8rc": {"JSON"},
".clang-format": {"YAML"},
".clang-tidy": {"YAML"},
".classpath": {"XML"},
".coffeelintignore": {"Ignore List"},
".coveragerc": {"INI"},
".cproject": {"XML"},
".cshrc": {"Shell"},
".curlrc": {"cURL Config"},
".cvsignore": {"Ignore List"},
".devcontainer.json": {"JSON with Comments"},
".dir_colors": {"dircolors"},
".dircolors": {"dircolors"},
".dockerignore": {"Ignore List"},
".editorconfig": {"EditorConfig"},
".eleventyignore": {"Ignore List"},
".emacs": {"Emacs Lisp"},
".emacs.desktop": {"Emacs Lisp"},
".env": {"Dotenv"},
".env.ci": {"Dotenv"},
".env.dev": {"Dotenv"},
".env.development": {"Dotenv"},
".env.development.local": {"Dotenv"},
".env.example": {"Dotenv"},
".env.local": {"Dotenv"},
".env.prod": {"Dotenv"},
".env.production": {"Dotenv"},
".env.sample": {"Dotenv"},
".env.staging": {"Dotenv"},
".env.test": {"Dotenv"},
".env.testing": {"Dotenv"},
".envrc": {"Shell"},
".eslintignore": {"Ignore List"},
".eslintrc.json": {"JSON with Comments"},
".exrc": {"Vim Script"},
".factor-boot-rc": {"Factor"},
".factor-rc": {"Factor"},
".flake8": {"INI"},
".flaskenv": {"Shell"},
".gclient": {"Python"},
".gemrc": {"YAML"},
".git-blame-ignore-revs": {"Git Revision List"},
".gitattributes": {"Git Attributes"},
".gitconfig": {"Git Config"},
".gitignore": {"Ignore List"},
".gitmodules": {"Git Config"},
".gn": {"GN"},
".gnus": {"Emacs Lisp"},
".gvimrc": {"Vim Script"},
".htaccess": {"ApacheConf"},
".htmlhintrc": {"JSON"},
".imgbotconfig": {"JSON"},
".inputrc": {"Readline Config"},
".irbrc": {"Ruby"},
".jscsrc": {"JSON with Comments"},
".jshintrc": {"JSON with Comments"},
".jslintrc": {"JSON with Comments"},
".justfile": {"Just"},
".kshrc": {"Shell"},
".latexmkrc": {"Perl"},
".login": {"Shell"},
".luacheckrc": {"Lua"},
".markdownlintignore": {"Ignore List"},
".nanorc": {"nanorc"},
".nodemonignore": {"Ignore List"},
".npmignore": {"Ignore List"},
".npmrc": {"NPM Config"},
".nvimrc": {"Vim Script"},
".nycrc": {"JSON"},
".php": {"PHP"},
".php_cs": {"PHP"},
".php_cs.dist": {"PHP"},
".prettierignore": {"Ignore List"},
".profile": {"Shell"},
".project": {"XML"},
".pryrc": {"Ruby"},
".pylintrc": {"INI"},
".rspec": {"Option List"},
".scalafix.conf": {"HOCON"},
".scalafmt.conf": {"HOCON"},
".shellcheckrc": {"ShellCheck Config"},
".simplecov": {"Ruby"},
".spacemacs": {"Emacs Lisp"},
".stylelintignore": {"Ignore List"},
".swcrc": {"JSON with Comments"},
".tern-config": {"JSON"},
".tern-project": {"JSON"},
".tm_properties": {"TextMate Properties"},
".tmux.conf": {"Shell"},
".vercelignore": {"Ignore List"},
".vimrc": {"Vim Script"},
".viper": {"Emacs Lisp"},
".vscodeignore": {"Ignore List"},
".watchmanconfig": {"JSON"},
".wgetrc": {"Wget Config"},
".yardopts": {"Option List"},
".zlogin": {"Shell"},
".zlogout": {"Shell"},
".zprofile": {"Shell"},
".zshenv": {"Shell"},
".zshrc": {"Shell"},
"9fs": {"Shell"},
"APKBUILD": {"Alpine Abuild"},
"Android.bp": {"Soong"},
"App.config": {"XML"},
"Appraisals": {"Ruby"},
"BSDmakefile": {"Makefile"},
"BUCK": {"Starlark"},
"BUILD": {"Starlark"},
"BUILD.bazel": {"Starlark"},
"Berksfile": {"Ruby"},
"Brewfile": {"Ruby"},
"Buildfile": {"Ruby"},
"CITATION": {"Text"},
"CITATION.cff": {"YAML"},
"CITATIONS": {"Text"},
"CMakeLists.txt": {"CMake"},
"CODEOWNERS": {"CODEOWNERS"},
"COPYING": {"Text"},
"COPYING.regex": {"Text"},
"COPYRIGHT.regex": {"Text"},
"Caddyfile": {"Caddyfile"},
"Cakefile": {"CoffeeScript"},
"Capfile": {"Ruby"},
"Cargo.lock": {"TOML"},
"Cargo.toml.orig": {"TOML"},
"Cask": {"Emacs Lisp"},
"Containerfile": {"Dockerfile"},
"DEPS": {"Python"},
"DIR_COLORS": {"dircolors"},
"Dangerfile": {"Ruby"},
"Deliverfile": {"Ruby"},
"Dockerfile": {"Dockerfile"},
"Earthfile": {"Earthly"},
"Emakefile": {"Erlang"},
"FONTLOG": {"Text"},
"Fakefile": {"Fancy"},
"Fastfile": {"Ruby"},
"GNUmakefile": {"Makefile"},
"Gemfile": {"Ruby"},
"Gemfile.lock": {"Gemfile.lock"},
"Gopkg.lock": {"TOML"},
"Guardfile": {"Ruby"},
"HOSTS": {"Hosts File", "INI"},
"INSTALL": {"Text"},
"INSTALL.mysql": {"Text"},
"JUSTFILE": {"Just"},
"Jakefile": {"JavaScript"},
"Jarfile": {"Ruby"},
"Jenkinsfile": {"Groovy"},
"Justfile": {"Just"},
"Kbuild": {"Makefile"},
"LICENSE": {"Text"},
"LICENSE.mysql": {"Text"},
"Lexer.x": {"Lex"},
"MANIFEST.MF": {"JAR Manifest"},
"MD5SUMS": {"Checksums"},
"MODULE.bazel": {"Starlark"},
"MODULE.bazel.lock": {"JSON"},
"Makefile": {"Makefile"},
"Makefile.PL": {"Perl"},
"Makefile.am": {"Makefile"},
"Makefile.boot": {"Makefile"},
"Makefile.frag": {"Makefile"},
"Makefile.in": {"Makefile"},
"Makefile.inc": {"Makefile"},
"Makefile.wat": {"Makefile"},
"Mavenfile": {"Ruby"},
"Modulefile": {"Puppet"},
"NEWS": {"Text"},
"Notebook": {"Jupyter Notebook"},
"NuGet.config": {"XML"},
"Nukefile": {"Nu"},
"PKGBUILD": {"Shell"},
"Phakefile": {"PHP"},
"Pipfile": {"TOML"},
"Pipfile.lock": {"JSON"},
"Podfile": {"Ruby"},
"Procfile": {"Procfile"},
"Project.ede": {"Emacs Lisp"},
"Puppetfile": {"Ruby"},
"README.me": {"Text"},
"README.mysql": {"Text"},
"README.nss": {"Text"},
"ROOT": {"Isabelle ROOT"},
"Rakefile": {"Ruby"},
"Rexfile": {"Perl"},
"SConscript": {"Python"},
"SConstruct": {"Python"},
"SHA1SUMS": {"Checksums"},
"SHA256SUMS": {"Checksums"},
"SHA256SUMS.txt": {"Checksums"},
"SHA512SUMS": {"Checksums"},
"Settings.StyleCop": {"XML"},
"Singularity": {"Singularity"},
"Slakefile": {"LiveScript"},
"Snakefile": {"Snakemake"},
"Snapfile": {"Ruby"},
"Steepfile": {"Ruby"},
"Thorfile": {"Ruby"},
"Tiltfile": {"Starlark"},
"Vagrantfile": {"Ruby"},
"WORKSPACE": {"Starlark"},
"WORKSPACE.bazel": {"Starlark"},
"Web.Debug.config": {"XML"},
"Web.Release.config": {"XML"},
"Web.config": {"XML"},
"XCompose": {"XCompose"},
"_curlrc": {"cURL Config"},
"_dir_colors": {"dircolors"},
"_dircolors": {"dircolors"},
"_emacs": {"Emacs Lisp"},
"_redirects": {"Redirect Rules"},
"_vimrc": {"Vim Script"},
"abbrev_defs": {"Emacs Lisp"},
"ack": {"Perl"},
"ackrc": {"Option List"},
"ant.xml": {"Ant Build System"},
"apache2.conf": {"ApacheConf"},
"api-extractor.json": {"JSON with Comments"},
"bash_aliases": {"Shell"},
"bash_logout": {"Shell"},
"bash_profile": {"Shell"},
"bashrc": {"Shell"},
"browserslist": {"Browserslist"},
"build.xml": {"Ant Build System"},
"buildfile": {"Ruby"},
"buildozer.spec": {"INI"},
"cabal.config": {"Cabal Config"},
"cabal.project": {"Cabal Config"},
"checksums.txt": {"Checksums"},
"cksums": {"Checksums"},
"click.me": {"Text"},
"composer.lock": {"JSON"},
"configure.ac": {"M4Sugar"},
"contents.lr": {"Markdown"},
"cpanfile": {"Perl"},
"crontab": {"crontab"},
"cshrc": {"Shell"},
"delete.me": {"Text"},
"deno.lock": {"JSON"},
"descrip.mmk": {"Module Management System"},
"descrip.mms": {"Module Management System"},
"devcontainer.json": {"JSON with Comments"},
"dir_colors": {"dircolors"},
"encodings.dir": {"X Font Directory Index"},
"eqnrc": {"Roff"},
"expr-dist": {"R"},
"file_contexts": {"SELinux Policy"},
"firestore.rules": {"Cloud Firestore Security Rules"},
"flake.lock": {"JSON"},
"fonts.alias": {"X Font Directory Index"},
"fonts.dir": {"X Font Directory Index"},
"fonts.scale": {"X Font Directory Index"},
"fp-lib-table": {"KiCad Layout"},
"genfs_contexts": {"SELinux Policy"},
"gitignore-global": {"Ignore List"},
"gitignore_global": {"Ignore List"},
"glide.lock": {"YAML"},
"go.mod": {"Go Module"},
"go.sum": {"Go Checksums"},
"go.work": {"Go Workspace"},
"go.work.sum": {"Go Checksums"},
"gradlew": {"Shell"},
"gvimrc": {"Vim Script"},
"haproxy.cfg": {"HAProxy"},
"hosts": {"Hosts File", "INI"},
"httpd.conf": {"ApacheConf"},
"initial_sids": {"SELinux Policy"},
"inputrc": {"Readline Config"},
"installscript.qs": {"Qt Script"},
"jsconfig.json": {"JSON with Comments"},
"justfile": {"Just"},
"kakrc": {"KakouneScript"},
"keep.me": {"Text"},
"kshrc": {"Shell"},
"language-configuration.json": {"JSON with Comments"},
"language-subtag-registry.txt": {"Record Jar"},
"latexmkrc": {"Perl"},
"ld.script": {"Linker Script"},
"lexer.x": {"Lex"},
"login": {"Shell"},
"m3makefile": {"Quake"},
"m3overrides": {"Quake"},
"makefile": {"Makefile"},
"makefile.sco": {"Makefile"},
"man": {"Shell"},
"mcmod.info": {"JSON"},
"md5sum.txt": {"Checksums"},
"meson.build": {"Meson"},
"meson_options.txt": {"Meson"},
"mix.lock": {"Elixir"},
"mkfile": {"Makefile"},
"mmn": {"Roff"},
"mmt": {"Roff"},
"mocha.opts": {"Option List"},
"nanorc": {"nanorc"},
"nextflow.config": {"Nextflow"},
"nginx.conf": {"Nginx"},
"nim.cfg": {"Nim"},
"nvimrc": {"Vim Script"},
"owh": {"Tcl"},
"package.mask": {"Text"},
"package.use.mask": {"Text"},
"package.use.stable.mask": {"Text"},
"packages.config": {"XML"},
"pdm.lock": {"TOML"},
"poetry.lock": {"TOML"},
"pom.xml": {"Maven POM"},
"port_contexts": {"SELinux Policy"},
"profile": {"Shell"},
"project.godot": {"Godot Resource"},
"pylintrc": {"INI"},
"read.me": {"Text"},
"readme.1st": {"Text"},
"rebar.config": {"Erlang"},
"rebar.config.lock": {"Erlang"},
"rebar.lock": {"Erlang"},
"requirements-dev.txt": {"Pip Requirements"},
"requirements.txt": {"Pip Requirements"},
"riemann.config": {"Clojure"},
"robots.txt": {"robots.txt"},
"security_classes": {"SELinux Policy"},
"ssh-config": {"SSH Config"},
"ssh_config": {"SSH Config"},
"sshconfig": {"SSH Config"},
"sshconfig.snip": {"SSH Config"},
"sshd-config": {"SSH Config"},
"sshd_config": {"SSH Config"},
"starfield": {"Tcl"},
"test.me": {"Text"},
"tmux.conf": {"Shell"},
"toolchain_installscript.qs": {"Qt Script"},
"troffrc": {"Roff"},
"troffrc-end": {"Roff"},
"tsconfig.json": {"JSON with Comments"},
"tslint.json": {"JSON with Comments"},
"use.mask": {"Text"},
"use.stable.mask": {"Text"},
"vimrc": {"Vim Script"},
"vlcrc": {"INI"},
"wscript": {"Python"},
"xcompose": {"XCompose"},
"yarn.lock": {"YAML"},
"zlogin": {"Shell"},
"zlogout": {"Shell"},
"zprofile": {"Shell"},
"zshenv": {"Shell"},
"zshrc": {"Shell"},
}

225778
go-enry/data/frequencies.go Normal file

File diff suppressed because it is too large Load Diff

845
go-enry/data/generated.go Normal file
View File

@ -0,0 +1,845 @@
package data
import (
"bytes"
"strings"
"github.com/go-enry/go-enry/v2/regex"
)
// GeneratedCodeExtensions contains all extensions that belong to generated
// files for sure.
var GeneratedCodeExtensions = map[string]struct{}{
// XCode files
".nib": {},
".xcworkspacedata": {},
".xcuserstate": {},
}
// GeneratedCodeNameMatcher is a function that tells whether the file with the
// given name is generated.
type GeneratedCodeNameMatcher func(string) bool
func nameMatches(pattern string) GeneratedCodeNameMatcher {
r := regex.MustCompile(pattern)
return func(name string) bool {
return r.MatchString(name)
}
}
func nameContains(pattern string) GeneratedCodeNameMatcher {
return func(name string) bool {
return strings.Contains(name, pattern)
}
}
func nameEndsWith(pattern string) GeneratedCodeNameMatcher {
return func(name string) bool {
return strings.HasSuffix(name, pattern)
}
}
// GeneratedCodeNameMatchers are all the matchers that check whether the code
// is generated based only on the file name.
var GeneratedCodeNameMatchers = []GeneratedCodeNameMatcher{
// Cocoa pods
nameMatches(`(^Pods|\/Pods)\/`),
// Carthage build
nameMatches(`(^|\/)Carthage\/Build\/`),
// NET designer file
nameMatches(`(?i)\.designer\.(cs|vb)$`),
// Generated NET specflow feature file
nameEndsWith(".feature.cs"),
// Node modules
nameContains("node_modules/"),
// Go vendor
nameMatches(`vendor\/([-0-9A-Za-z]+\.)+(com|edu|gov|in|me|net|org|fm|io)`),
// Go lock
nameEndsWith("Gopkg.lock"),
nameEndsWith("glide.lock"),
// Esy lock
nameMatches(`(^|\/)(\w+\.)?esy.lock$`),
// NPM shrinkwrap
nameEndsWith("npm-shrinkwrap.json"),
// NPM package lock
nameEndsWith("package-lock.json"),
// Yarn plugnplay
nameMatches(`(^|\/)\.pnp\..*$`),
// Godeps
nameContains("Godeps/"),
// Composer lock
nameEndsWith("composer.lock"),
// Generated by zephir
nameMatches(`.\.zep\.(?:c|h|php)$`),
// Cargo lock
nameEndsWith("Cargo.lock"),
// Pipenv lock
nameEndsWith("Pipfile.lock"),
// GraphQL relay
nameContains("__generated__/"),
// Poetry lock
nameEndsWith("poetry.lock"),
}
// GeneratedCodeMatcher checks whether the file with the given data is
// generated code.
type GeneratedCodeMatcher func(path, ext string, content []byte) bool
// GeneratedCodeMatchers is the list of all generated code matchers that
// rely on checking the content of the file to make the guess.
var GeneratedCodeMatchers = []GeneratedCodeMatcher{
isMinifiedFile,
hasSourceMapReference,
isSourceMap,
isCompiledCoffeeScript,
isGeneratedNetDocfile,
isGeneratedJavaScriptPEGParser,
isGeneratedPostScript,
isGeneratedGo,
isGeneratedProtobufFromGo,
isGeneratedProtobuf,
isGeneratedJavaScriptProtocolBuffer,
isGeneratedApacheThrift,
isGeneratedJNIHeader,
isVCRCassette,
isCompiledCythonFile,
isGeneratedModule,
isGeneratedUnity3DMeta,
isGeneratedRacc,
isGeneratedJFlex,
isGeneratedGrammarKit,
isGeneratedRoxygen2,
isGeneratedJison,
isGeneratedGRPCCpp,
isGeneratedDart,
isGeneratedPerlPPPortHeader,
isGeneratedGameMakerStudio,
isGeneratedGimp,
isGeneratedVisualStudio6,
isGeneratedHaxe,
isGeneratedHTML,
isGeneratedJooq,
}
func canBeMinified(ext string) bool {
return ext == ".js" || ext == ".css"
}
// isMinifiedFile returns whether the file may be minified.
// We consider a minified file any css or js file whose average number of chars
// per line is more than 110.
func isMinifiedFile(path, ext string, content []byte) bool {
if !canBeMinified(ext) {
return false
}
var chars, lines uint64
forEachLine(content, func(line []byte) {
chars += uint64(len(line))
lines++
})
if lines == 0 {
return false
}
return chars/lines > 110
}
var sourceMapRegex = regex.MustCompile(`^\/[*\/][\#@] source(?:Mapping)?URL|sourceURL=`)
// hasSourceMapReference returns whether the file contains a reference to a
// source-map file.
func hasSourceMapReference(_ string, ext string, content []byte) bool {
if !canBeMinified(ext) {
return false
}
for _, line := range getLines(content, -2) {
if sourceMapRegex.Match(line) {
return true
}
}
return false
}
var sourceMapRegexps = []regex.EnryRegexp{
regex.MustCompile(`^{"version":\d+,`),
regex.MustCompile(`^\/\*\* Begin line maps\. \*\*\/{`),
}
// isSourceMap returns whether the file itself is a source map.
func isSourceMap(path, _ string, content []byte) bool {
if strings.HasSuffix(path, ".js.map") || strings.HasSuffix(path, ".css.map") {
return true
}
firstLine := getFirstLine(content)
if len(firstLine) == 0 {
return false
}
for _, r := range sourceMapRegexps {
if r.Match(firstLine) {
return true
}
}
return false
}
func isCompiledCoffeeScript(path, ext string, content []byte) bool {
if ext != ".js" {
return false
}
firstLine := getFirstLine(content)
lastLines := getLines(content, -2)
if len(lastLines) < 2 {
return false
}
if string(firstLine) == "(function() {" &&
string(lastLines[1]) == "}).call(this);" &&
string(lastLines[0]) == "" {
score := 0
forEachLine(content, func(line []byte) {
if bytes.Contains(line, []byte("var ")) {
// Underscored temp vars are likely to be Coffee
score += 1 * countAppearancesInLine(line, "_fn", "_i", "_len", "_ref", "_results")
// bind and extend functions are very Coffee specific
score += 3 * countAppearancesInLine(line, "__bind", "__extends", "__hasProp", "__indexOf", "__slice")
}
})
// Require a score of 3. This is fairly arbitrary. Consider tweaking later.
// See: https://github.com/github/linguist/blob/master/lib/linguist/generated.rb#L176-L213
return score >= 3
}
return false
}
func isGeneratedNetDocfile(_, ext string, content []byte) bool {
if ext != ".xml" {
return false
}
lines := bytes.Split(content, []byte{'\n'})
if len(lines) <= 3 {
return false
}
return bytes.Contains(lines[1], []byte("<doc>")) &&
bytes.Contains(lines[2], []byte("<assembly>")) &&
bytes.Contains(lines[len(lines)-2], []byte("</doc>"))
}
var pegJavaScriptGeneratedRegex = regex.MustCompile(`^(?:[^\/]|\/[^\*])*\/\*(?:[^\*]|\*[^\/])*Generated by PEG.js`)
func isGeneratedJavaScriptPEGParser(_, ext string, content []byte) bool {
if ext != ".js" {
return false
}
// PEG.js-generated parsers include a comment near the top of the file
// that marks them as such.
return pegJavaScriptGeneratedRegex.Match(bytes.Join(getLines(content, 5), []byte("")))
}
var postScriptType1And42Regex = regex.MustCompile(`(\n|\r\n|\r)\s*(?:currentfile eexec\s+|\/sfnts\s+\[)`)
var postScriptRegexes = []regex.EnryRegexp{
regex.MustCompile(`[0-9]|draw|mpage|ImageMagick|inkscape|MATLAB`),
regex.MustCompile(`PCBNEW|pnmtops|\(Unknown\)|Serif Affinity|Filterimage -tops`),
}
func isGeneratedPostScript(_, ext string, content []byte) bool {
if ext != ".ps" && ext != ".eps" && ext != ".pfa" {
return false
}
// Type 1 and Type 42 fonts converted to PostScript are stored as hex-encoded byte streams; these
// streams are always preceded the `eexec` operator (if Type 1), or the `/sfnts` key (if Type 42).
if postScriptType1And42Regex.Match(content) {
return true
}
// We analyze the "%%Creator:" comment, which contains the author/generator
// of the file. If there is one, it should be in one of the first few lines.
var creator []byte
for _, line := range getLines(content, 10) {
if bytes.HasPrefix(line, []byte("%%Creator: ")) {
creator = line
break
}
}
if len(creator) == 0 {
return false
}
// EAGLE doesn't include a version number when it generates PostScript.
// However, it does prepend its name to the document's "%%Title" field.
if bytes.Contains(creator, []byte("EAGLE")) {
for _, line := range getLines(content, 5) {
if bytes.HasPrefix(line, []byte("%%Title: EAGLE Drawing ")) {
return true
}
}
}
// Most generators write their version number, while human authors' or companies'
// names don't contain numbers. So look if the line contains digits. Also
// look for some special cases without version numbers.
for _, r := range postScriptRegexes {
if r.Match(creator) {
return true
}
}
return false
}
func isGeneratedGo(_, ext string, content []byte) bool {
if ext != ".go" {
return false
}
lines := getLines(content, 40)
if len(lines) <= 1 {
return false
}
for _, line := range lines {
if bytes.Contains(line, []byte("Code generated by")) {
return true
}
}
return false
}
func isGeneratedProtobufFromGo(_, ext string, content []byte) bool {
if ext != ".proto" {
return false
}
lines := getLines(content, 20)
if len(lines) <= 1 {
return false
}
for _, line := range lines {
if bytes.Contains(line, []byte("This file was autogenerated by go-to-protobuf")) {
return true
}
}
return false
}
var protoExtensions = map[string]struct{}{
".py": {},
".java": {},
".h": {},
".cc": {},
".cpp": {},
".m": {},
".rb": {},
".php": {},
}
func isGeneratedProtobuf(_, ext string, content []byte) bool {
if _, ok := protoExtensions[ext]; !ok {
return false
}
lines := getLines(content, 3)
if len(lines) <= 1 {
return false
}
for _, line := range lines {
if bytes.Contains(line, []byte("Generated by the protocol buffer compiler. DO NOT EDIT!")) {
return true
}
}
return false
}
func isGeneratedJavaScriptProtocolBuffer(_, ext string, content []byte) bool {
if ext != ".js" {
return false
}
lines := getLines(content, 6)
if len(lines) < 6 {
return false
}
return bytes.Contains(lines[5], []byte("GENERATED CODE -- DO NOT EDIT!"))
}
var apacheThriftExtensions = map[string]struct{}{
".rb": {},
".py": {},
".go": {},
".js": {},
".m": {},
".java": {},
".h": {},
".cc": {},
".cpp": {},
".php": {},
}
func isGeneratedApacheThrift(_, ext string, content []byte) bool {
if _, ok := apacheThriftExtensions[ext]; !ok {
return false
}
for _, line := range getLines(content, 6) {
if bytes.Contains(line, []byte("Autogenerated by Thrift Compiler")) {
return true
}
}
return false
}
func isGeneratedJNIHeader(_, ext string, content []byte) bool {
if ext != ".h" {
return false
}
lines := getLines(content, 2)
if len(lines) < 2 {
return false
}
return bytes.Contains(lines[0], []byte("/* DO NOT EDIT THIS FILE - it is machine generated */")) &&
bytes.Contains(lines[1], []byte("#include <jni.h>"))
}
func isVCRCassette(_, ext string, content []byte) bool {
if ext != ".yml" {
return false
}
lines := getLines(content, -2)
if len(lines) < 2 {
return false
}
return bytes.Contains(lines[1], []byte("recorded_with: VCR"))
}
func isCompiledCythonFile(_, ext string, content []byte) bool {
if ext != ".c" && ext != ".cpp" {
return false
}
lines := getLines(content, 1)
if len(lines) < 1 {
return false
}
return bytes.Contains(lines[0], []byte("Generated by Cython"))
}
func isGeneratedModule(_, ext string, content []byte) bool {
if ext != ".mod" {
return false
}
lines := getLines(content, 1)
if len(lines) < 1 {
return false
}
return bytes.Contains(lines[0], []byte("PCBNEW-LibModule-V")) ||
bytes.Contains(lines[0], []byte("GFORTRAN module version '"))
}
func isGeneratedUnity3DMeta(_, ext string, content []byte) bool {
if ext != ".meta" {
return false
}
lines := getLines(content, 1)
if len(lines) < 1 {
return false
}
return bytes.Contains(lines[0], []byte("fileFormatVersion: "))
}
func isGeneratedRacc(_, ext string, content []byte) bool {
if ext != ".rb" {
return false
}
lines := getLines(content, 3)
if len(lines) < 3 {
return false
}
return bytes.HasPrefix(lines[2], []byte("# This file is automatically generated by Racc"))
}
func isGeneratedJFlex(_, ext string, content []byte) bool {
if ext != ".java" {
return false
}
lines := getLines(content, 1)
if len(lines) < 1 {
return false
}
return bytes.HasPrefix(lines[0], []byte("/* The following code was generated by JFlex "))
}
func isGeneratedGrammarKit(_, ext string, content []byte) bool {
if ext != ".java" {
return false
}
lines := getLines(content, 1)
if len(lines) < 1 {
return false
}
return bytes.Contains(lines[0], []byte("// This is a generated file. Not intended for manual editing."))
}
func isGeneratedRoxygen2(_, ext string, content []byte) bool {
if ext != ".rd" {
return false
}
lines := getLines(content, 1)
if len(lines) < 1 {
return false
}
return bytes.Contains(lines[0], []byte("% Generated by roxygen2: do not edit by hand"))
}
func isGeneratedJison(_, ext string, content []byte) bool {
if ext != ".js" {
return false
}
lines := getLines(content, 1)
if len(lines) < 1 {
return false
}
return bytes.Contains(lines[0], []byte("/* parser generated by jison ")) ||
bytes.Contains(lines[0], []byte("/* generated by jison-lex "))
}
func isGeneratedGRPCCpp(_, ext string, content []byte) bool {
switch ext {
case ".cpp", ".hpp", ".h", ".cc":
lines := getLines(content, 1)
if len(lines) < 1 {
return false
}
return bytes.Contains(lines[0], []byte("// Generated by the gRPC"))
default:
return false
}
}
var dartRegex = regex.MustCompile(`generated code\W{2,3}do not modify`)
func isGeneratedDart(_, ext string, content []byte) bool {
if ext != ".dart" {
return false
}
lines := getLines(content, 1)
if len(lines) < 1 {
return false
}
return dartRegex.Match(bytes.ToLower(lines[0]))
}
func isGeneratedPerlPPPortHeader(name, _ string, content []byte) bool {
if !strings.HasSuffix(name, "ppport.h") {
return false
}
lines := getLines(content, 10)
if len(lines) < 10 {
return false
}
return bytes.Contains(lines[8], []byte("Automatically created by Devel::PPPort"))
}
var (
gameMakerStudioFirstLineRegex = regex.MustCompile(`^\d\.\d\.\d.+\|\{`)
gameMakerStudioThirdLineRegex = regex.MustCompile(`\"modelName\"\:\s*\"GM`)
)
func isGeneratedGameMakerStudio(_, ext string, content []byte) bool {
if ext != ".yy" && ext != ".yyp" {
return false
}
lines := getLines(content, 3)
if len(lines) < 3 {
return false
}
return gameMakerStudioThirdLineRegex.Match(lines[2]) ||
gameMakerStudioFirstLineRegex.Match(lines[0])
}
var gimpRegexes = []regex.EnryRegexp{
regex.MustCompile(`\/\* GIMP [a-zA-Z0-9\- ]+ C\-Source image dump \(.+?\.c\) \*\/`),
regex.MustCompile(`\/\* GIMP header image file format \([a-zA-Z0-9\- ]+\)\: .+?\.h \*\/`),
}
func isGeneratedGimp(_, ext string, content []byte) bool {
if ext != ".c" && ext != ".h" {
return false
}
lines := getLines(content, 1)
if len(lines) < 1 {
return false
}
for _, r := range gimpRegexes {
if r.Match(lines[0]) {
return true
}
}
return false
}
func isGeneratedVisualStudio6(_, ext string, content []byte) bool {
if ext != ".dsp" {
return false
}
for _, l := range getLines(content, 3) {
if bytes.Contains(l, []byte("# Microsoft Developer Studio Generated Build File")) {
return true
}
}
return false
}
var haxeExtensions = map[string]struct{}{
".js": {},
".py": {},
".lua": {},
".cpp": {},
".h": {},
".java": {},
".cs": {},
".php": {},
}
func isGeneratedHaxe(_, ext string, content []byte) bool {
if _, ok := haxeExtensions[ext]; !ok {
return false
}
for _, l := range getLines(content, 3) {
if bytes.Contains(l, []byte("Generated by Haxe")) {
return true
}
}
return false
}
var (
doxygenRegex = regex.MustCompile(`<!--\s+Generated by Doxygen\s+[.0-9]+\s*-->`)
htmlMetaRegex = regex.MustCompile(`<meta(\s+[^>]+)>`)
htmlMetaContentRegex = regex.MustCompile(`\s+(name|content|value)\s*=\s*("[^"]+"|'[^']+'|[^\s"']+)`)
orgModeMetaRegex = regex.MustCompile(`org\s+mode`)
)
func isGeneratedHTML(_, ext string, content []byte) bool {
if ext != ".html" && ext != ".htm" && ext != ".xhtml" {
return false
}
lines := getLines(content, 30)
// Pkgdown
if len(lines) >= 2 {
for _, l := range lines[:2] {
if bytes.Contains(l, []byte("<!-- Generated by pkgdown: do not edit by hand -->")) {
return true
}
}
}
// Mandoc
if len(lines) > 2 &&
bytes.HasPrefix(lines[2], []byte("<!-- This is an automatically generated file.")) {
return true
}
// Doxygen
for _, l := range lines {
if doxygenRegex.Match(l) {
return true
}
}
// HTML tag: <meta name="generator" content="" />
part := bytes.ToLower(bytes.Join(lines, []byte{' '}))
part = bytes.ReplaceAll(part, []byte{'\n'}, []byte{})
part = bytes.ReplaceAll(part, []byte{'\r'}, []byte{})
matches := htmlMetaRegex.FindAll(part, -1)
if len(matches) == 0 {
return false
}
for _, m := range matches {
var name, value, content string
ms := htmlMetaContentRegex.FindAllStringSubmatch(string(m), -1)
for _, m := range ms {
switch m[1] {
case "name":
name = m[2]
case "value":
value = m[2]
case "content":
content = m[2]
}
}
var val = value
if val == "" {
val = content
}
name = strings.Trim(name, `"'`)
val = strings.Trim(val, `"'`)
if name != "generator" || val == "" {
continue
}
if strings.Contains(val, "jlatex2html") ||
strings.Contains(val, "latex2html") ||
strings.Contains(val, "groff") ||
strings.Contains(val, "makeinfo") ||
strings.Contains(val, "texi2html") ||
strings.Contains(val, "ronn") ||
orgModeMetaRegex.MatchString(val) {
return true
}
}
return false
}
func isGeneratedJooq(_, ext string, content []byte) bool {
if ext != ".java" {
return false
}
for _, l := range getLines(content, 2) {
if bytes.Contains(l, []byte("This file is generated by jOOQ.")) {
return true
}
}
return false
}
func getFirstLine(content []byte) []byte {
lines := getLines(content, 1)
if len(lines) > 0 {
return lines[0]
}
return nil
}
// getLines returns up to the first n lines. A negative index will return up to
// the last n lines in reverse order.
func getLines(content []byte, n int) [][]byte {
var result [][]byte
if n < 0 {
for pos := len(content); pos > 0 && len(result) < -n; {
nlpos := bytes.LastIndexByte(content[:pos], '\n')
if nlpos+1 < len(content)-1 {
result = append(result, content[nlpos+1:pos])
}
pos = nlpos
}
} else {
for pos := 0; pos < len(content) && len(result) < n; {
nlpos := bytes.IndexByte(content[pos:], '\n')
if nlpos < 0 && pos < len(content) {
nlpos = len(content)
} else if nlpos >= 0 {
nlpos += pos
}
result = append(result, content[pos:nlpos])
pos = nlpos + 1
}
}
return result
}
func forEachLine(content []byte, cb func([]byte)) {
var pos int
for pos < len(content) {
nlpos := bytes.IndexByte(content[pos:], '\n')
if nlpos < 0 && pos < len(content) {
nlpos = len(content)
} else if nlpos >= 0 {
nlpos += pos
}
cb(content[pos:nlpos])
pos = nlpos + 1
}
}
func countAppearancesInLine(line []byte, targets ...string) int {
var count int
for _, t := range targets {
count += bytes.Count(line, []byte(t))
}
return count
}

View File

@ -0,0 +1,54 @@
package data
import (
"fmt"
"strings"
"testing"
"github.com/stretchr/testify/require"
)
func TestGetFirstLineEmptyContent(t *testing.T) {
require.Nil(t, getFirstLine(nil))
}
func TestForEachLine(t *testing.T) {
const sample = "foo\nbar\nboomboom\nbleepbloop\n"
var lines = strings.Split(sample, "\n")
var result []string
forEachLine([]byte(sample), func(l []byte) {
result = append(result, string(l))
})
require.Equal(t, lines[:len(lines)-1], result)
}
func TestGetLines(t *testing.T) {
const sample = "foo\nbar\nboomboom\nbleepbloop\n"
testCases := []struct {
lines int
expected []string
}{
{1, []string{"foo"}},
{2, []string{"foo", "bar"}},
{10, []string{"foo", "bar", "boomboom", "bleepbloop"}},
{-1, []string{"bleepbloop"}},
{-2, []string{"bleepbloop", "boomboom"}},
{-10, []string{"bleepbloop", "boomboom", "bar", "foo"}},
}
for _, tt := range testCases {
t.Run(fmt.Sprint(tt.lines), func(t *testing.T) {
lines := getLines([]byte(sample), tt.lines)
var result = make([]string, len(lines))
for i, l := range lines {
result[i] = string(l)
}
require.Equal(t, tt.expected, result)
})
}
}

87
go-enry/data/groups.go Normal file
View File

@ -0,0 +1,87 @@
// Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 42fd3c2514375fc6ad281552368edd3fb9f6ee7f
package data
var LanguagesGroup = map[string]string{
"Alpine Abuild": "Shell",
"Apollo Guidance Computer": "Assembly",
"BibTeX": "TeX",
"Bison": "Yacc",
"Bluespec BH": "Bluespec",
"C2hs Haskell": "Haskell",
"CameLIGO": "LigoLANG",
"ColdFusion CFC": "ColdFusion",
"ECLiPSe": "Prolog",
"Easybuild": "Python",
"Ecere Projects": "JavaScript",
"Ecmarkup": "HTML",
"EditorConfig": "INI",
"Elvish Transcript": "Elvish",
"Filterscript": "RenderScript",
"Fortran": "Fortran",
"Fortran Free Form": "Fortran",
"Gentoo Ebuild": "Shell",
"Gentoo Eclass": "Shell",
"Git Config": "INI",
"Glimmer JS": "JavaScript",
"Glimmer TS": "TypeScript",
"Gradle Kotlin DSL": "Gradle",
"Groovy Server Pages": "Groovy",
"HTML+ECR": "HTML",
"HTML+EEX": "HTML",
"HTML+ERB": "HTML",
"HTML+PHP": "HTML",
"HTML+Razor": "HTML",
"Isabelle ROOT": "Isabelle",
"JFlex": "Lex",
"JSON with Comments": "JSON",
"Java Server Pages": "Java",
"JavaScript+ERB": "JavaScript",
"Jison": "Yacc",
"Jison Lex": "Lex",
"Julia REPL": "Julia",
"Lean 4": "Lean",
"LigoLANG": "LigoLANG",
"Literate Agda": "Agda",
"Literate CoffeeScript": "CoffeeScript",
"Literate Haskell": "Haskell",
"M4Sugar": "M4",
"MUF": "Forth",
"Maven POM": "XML",
"Motorola 68K Assembly": "Assembly",
"NPM Config": "INI",
"NumPy": "Python",
"OASv2-json": "OpenAPI Specification v2",
"OASv2-yaml": "OpenAPI Specification v2",
"OASv3-json": "OpenAPI Specification v3",
"OASv3-yaml": "OpenAPI Specification v3",
"OpenCL": "C",
"OpenRC runscript": "Shell",
"Parrot Assembly": "Parrot",
"Parrot Internal Representation": "Parrot",
"Pic": "Roff",
"PostCSS": "CSS",
"Python console": "Python",
"Python traceback": "Python",
"RBS": "Ruby",
"Readline Config": "INI",
"ReasonLIGO": "LigoLANG",
"Roff Manpage": "Roff",
"SSH Config": "INI",
"STON": "Smalltalk",
"Simple File Verification": "Checksums",
"Snakemake": "Python",
"TSX": "TypeScript",
"Tcsh": "Shell",
"Terraform Template": "HCL",
"Unified Parallel C": "C",
"Unix Assembly": "Assembly",
"Wget Config": "INI",
"X BitMap": "C",
"X PixMap": "C",
"XML Property List": "XML",
"cURL Config": "INI",
"fish": "Shell",
"nanorc": "INI",
}

View File

@ -0,0 +1,35 @@
package data
import "github.com/go-enry/go-enry/v2/data/rule"
// Heuristics implements a rule-based content matching engine.
// Heuristics is a number of sequentially applied rule.Heuristic where a
// matching one disambiguates language(s) for a single file extension.
type Heuristics []rule.Heuristic
// Match returns languages identified by the matching rule of the heuristic.
func (hs Heuristics) Match(data []byte) []string {
var matchedLangs []string
for _, heuristic := range hs {
if heuristic.Match(data) {
for _, langOrAlias := range heuristic.Languages() {
lang, ok := LanguageByAlias(langOrAlias)
if !ok { // should never happen
// reaching here means language name/alias in heuristics.yml
// is not consistent with languages.yml
// but we do not surface any such error at the API
continue
}
matchedLangs = append(matchedLangs, lang)
}
break
}
}
return matchedLangs
}
// matchString is a convenience used only in tests.
func (hs *Heuristics) matchString(data string) []string {
return hs.Match([]byte(data))
}

View File

@ -0,0 +1,61 @@
package data
import (
"regexp"
"testing"
"github.com/go-enry/go-enry/v2/data/rule"
"github.com/stretchr/testify/assert"
)
var testContentHeuristics = map[string]*Heuristics{
".md": &Heuristics{ // final pattern for parsed YAML rule
rule.Or(
rule.MatchingLanguages("Markdown"),
regexp.MustCompile(`(^[-A-Za-z0-9=#!\*\[|>])|<\/ | \A\z`),
),
rule.Or(
rule.MatchingLanguages("GCC Machine Description"),
regexp.MustCompile(`^(;;|\(define_)`),
),
rule.Always(
rule.MatchingLanguages("Markdown"),
),
},
".ms": &Heuristics{
// Order defines precedence: And, Or, Not, Named, Always
rule.And(
rule.MatchingLanguages("Unix Assembly"),
rule.Not(rule.MatchingLanguages(""), regexp.MustCompile(`/\*`)),
rule.Or(
rule.MatchingLanguages(""),
regexp.MustCompile(`^\s*\.(?:include\s|globa?l\s|[A-Za-z][_A-Za-z0-9]*:)`),
),
),
rule.Or(
rule.MatchingLanguages("Roff"),
regexp.MustCompile(`^[.''][A-Za-z]{2}(\s|$)`),
),
rule.Always(
rule.MatchingLanguages("MAXScript"),
),
},
}
func TestContentHeuristic_MatchingAlways(t *testing.T) {
lang := testContentHeuristics[".md"].matchString("")
assert.Equal(t, []string{"Markdown"}, lang)
lang = testContentHeuristics[".ms"].matchString("")
assert.Equal(t, []string{"MAXScript"}, lang)
}
func TestContentHeuristic_MatchingAnd(t *testing.T) {
lang := testContentHeuristics[".md"].matchString(";;")
assert.Equal(t, []string{"GCC Machine Description"}, lang)
}
func TestContentHeuristic_MatchingOr(t *testing.T) {
lang := testContentHeuristics[".ms"].matchString(" .include \"math.s\"")
assert.Equal(t, []string{"Unix Assembly"}, lang)
}

737
go-enry/data/id.go Normal file
View File

@ -0,0 +1,737 @@
// Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 42fd3c2514375fc6ad281552368edd3fb9f6ee7f
package data
var IDByLanguage = map[string]int{
"1C Enterprise": 0,
"2-Dimensional Array": 387204628,
"4D": 577529595,
"ABAP": 1,
"ABAP CDS": 452681853,
"ABNF": 429,
"AGS Script": 2,
"AIDL": 451700185,
"AL": 658971832,
"AMPL": 3,
"ANTLR": 4,
"API Blueprint": 5,
"APL": 6,
"ASL": 124996147,
"ASN.1": 7,
"ASP.NET": 564186416,
"ATS": 9,
"ActionScript": 10,
"Ada": 11,
"Adblock Filter List": 884614762,
"Adobe Font Metrics": 147198098,
"Agda": 12,
"Alloy": 13,
"Alpine Abuild": 14,
"Altium Designer": 187772328,
"AngelScript": 389477596,
"Ant Build System": 15,
"Antlers": 1067292663,
"ApacheConf": 16,
"Apex": 17,
"Apollo Guidance Computer": 18,
"AppleScript": 19,
"Arc": 20,
"AsciiDoc": 22,
"AspectJ": 23,
"Assembly": 24,
"Astro": 578209015,
"Asymptote": 591605007,
"Augeas": 25,
"AutoHotkey": 26,
"AutoIt": 27,
"Avro IDL": 785497837,
"Awk": 28,
"BASIC": 28923963,
"BQN": 330386870,
"Ballerina": 720859680,
"Batchfile": 29,
"Beef": 545626333,
"Befunge": 30,
"Berry": 121855308,
"BibTeX": 982188347,
"Bicep": 321200902,
"Bikeshed": 1055528081,
"Bison": 31,
"BitBake": 32,
"Blade": 33,
"BlitzBasic": 34,
"BlitzMax": 35,
"Bluespec": 36,
"Bluespec BH": 641580358,
"Boo": 37,
"Boogie": 955017407,
"Brainfuck": 38,
"BrighterScript": 943571030,
"Brightscript": 39,
"Browserslist": 153503348,
"C": 41,
"C#": 42,
"C++": 43,
"C-ObjDump": 44,
"C2hs Haskell": 45,
"CAP CDS": 390788699,
"CIL": 29176339,
"CLIPS": 46,
"CMake": 47,
"COBOL": 48,
"CODEOWNERS": 321684729,
"COLLADA": 49,
"CSON": 424,
"CSS": 50,
"CSV": 51,
"CUE": 356063509,
"CWeb": 657332628,
"Cabal Config": 677095381,
"Caddyfile": 615465151,
"Cadence": 270184138,
"Cairo": 620599567,
"CameLIGO": 829207807,
"Cap'n Proto": 52,
"CartoCSS": 53,
"Ceylon": 54,
"Chapel": 55,
"Charity": 56,
"Checksums": 372063053,
"ChucK": 57,
"Circom": 1042332086,
"Cirru": 58,
"Clarion": 59,
"Clarity": 91493841,
"Classic ASP": 8,
"Clean": 60,
"Click": 61,
"Clojure": 62,
"Closure Templates": 357046146,
"Cloud Firestore Security Rules": 407996372,
"CoNLL-U": 421026389,
"CodeQL": 424259634,
"CoffeeScript": 63,
"ColdFusion": 64,
"ColdFusion CFC": 65,
"Common Lisp": 66,
"Common Workflow Language": 988547172,
"Component Pascal": 67,
"Cool": 68,
"Coq": 69,
"Cpp-ObjDump": 70,
"Creole": 71,
"Crystal": 72,
"Csound": 73,
"Csound Document": 74,
"Csound Score": 75,
"Cuda": 77,
"Cue Sheet": 942714150,
"Curry": 439829048,
"Cycript": 78,
"Cypher": 850806976,
"Cython": 79,
"D": 80,
"D-ObjDump": 81,
"D2": 37531557,
"DIGITAL Command Language": 82,
"DM": 83,
"DNS Zone": 84,
"DTrace": 85,
"Dafny": 969323346,
"Darcs Patch": 86,
"Dart": 87,
"DataWeave": 974514097,
"Debian Package Control File": 527438264,
"DenizenScript": 435000929,
"Dhall": 793969321,
"Diff": 88,
"DirectX 3D File": 201049282,
"Dockerfile": 89,
"Dogescript": 90,
"Dotenv": 111148035,
"Dylan": 91,
"E": 92,
"E-mail": 529653389,
"EBNF": 430,
"ECL": 93,
"ECLiPSe": 94,
"EJS": 95,
"EQ": 96,
"Eagle": 97,
"Earthly": 963512632,
"Easybuild": 342840477,
"Ecere Projects": 98,
"Ecmarkup": 844766630,
"Edge": 460509620,
"EdgeQL": 925235833,
"EditorConfig": 96139566,
"Edje Data Collection": 342840478,
"Eiffel": 99,
"Elixir": 100,
"Elm": 101,
"Elvish": 570996448,
"Elvish Transcript": 452025714,
"Emacs Lisp": 102,
"EmberScript": 103,
"Erlang": 104,
"Euphoria": 880693982,
"F#": 105,
"F*": 336943375,
"FIGlet Font": 686129783,
"FIRRTL": 906694254,
"FLUX": 106,
"Factor": 108,
"Fancy": 109,
"Fantom": 110,
"Faust": 622529198,
"Fennel": 239946126,
"Filebench WML": 111,
"Filterscript": 112,
"Fluent": 206353404,
"Formatted": 113,
"Forth": 114,
"Fortran": 107,
"Fortran Free Form": 761352333,
"FreeBasic": 472896659,
"FreeMarker": 115,
"Frege": 116,
"Futhark": 97358117,
"G-code": 117,
"GAML": 290345951,
"GAMS": 118,
"GAP": 119,
"GCC Machine Description": 121,
"GDB": 122,
"GDScript": 123,
"GEDCOM": 459577965,
"GLSL": 124,
"GN": 302957008,
"GSC": 257856279,
"Game Maker Language": 125,
"Gemfile.lock": 907065713,
"Gemini": 310828396,
"Genero 4gl": 986054050,
"Genero per": 902995658,
"Genie": 792408528,
"Genshi": 126,
"Gentoo Ebuild": 127,
"Gentoo Eclass": 128,
"Gerber Image": 404627610,
"Gettext Catalog": 129,
"Gherkin": 76,
"Git Attributes": 956324166,
"Git Config": 807968997,
"Git Revision List": 461881235,
"Gleam": 1054258749,
"Glimmer JS": 5523150,
"Glimmer TS": 95110458,
"Glyph": 130,
"Glyph Bitmap Distribution Format": 997665271,
"Gnuplot": 131,
"Go": 132,
"Go Checksums": 1054391671,
"Go Module": 947461016,
"Go Workspace": 934546256,
"Godot Resource": 738107771,
"Golo": 133,
"Gosu": 134,
"Grace": 135,
"Gradle": 136,
"Gradle Kotlin DSL": 432600901,
"Grammatical Framework": 137,
"Graph Modeling Language": 138,
"GraphQL": 139,
"Graphviz (DOT)": 140,
"Groovy": 142,
"Groovy Server Pages": 143,
"HAProxy": 366607477,
"HCL": 144,
"HLSL": 145,
"HOCON": 679725279,
"HTML": 146,
"HTML+ECR": 148,
"HTML+EEX": 149,
"HTML+ERB": 150,
"HTML+PHP": 151,
"HTML+Razor": 479039817,
"HTTP": 152,
"HXML": 786683730,
"Hack": 153,
"Haml": 154,
"Handlebars": 155,
"Harbour": 156,
"Haskell": 157,
"Haxe": 158,
"HiveQL": 931814087,
"HolyC": 928121743,
"Hosts File": 231021894,
"Hy": 159,
"HyPhy": 160,
"IDL": 161,
"IGOR Pro": 162,
"INI": 163,
"IRC log": 164,
"Idris": 165,
"Ignore List": 74444240,
"ImageJ Macro": 575143428,
"Imba": 1057618448,
"Inform 7": 166,
"Ink": 838252715,
"Inno Setup": 167,
"Io": 168,
"Ioke": 169,
"Isabelle": 170,
"Isabelle ROOT": 171,
"J": 172,
"JAR Manifest": 447261135,
"JCL": 316620079,
"JFlex": 173,
"JSON": 174,
"JSON with Comments": 423,
"JSON5": 175,
"JSONLD": 176,
"JSONiq": 177,
"Janet": 1028705371,
"Jasmin": 180,
"Java": 181,
"Java Properties": 519377561,
"Java Server Pages": 182,
"JavaScript": 183,
"JavaScript+ERB": 914318960,
"Jest Snapshot": 774635084,
"JetBrains MPS": 465165328,
"Jinja": 147,
"Jison": 284531423,
"Jison Lex": 406395330,
"Jolie": 998078858,
"Jsonnet": 664885656,
"Julia": 184,
"Julia REPL": 220689142,
"Jupyter Notebook": 185,
"Just": 128447695,
"KRL": 186,
"Kaitai Struct": 818804755,
"KakouneScript": 603336474,
"KerboScript": 59716426,
"KiCad Layout": 187,
"KiCad Legacy Layout": 140848857,
"KiCad Schematic": 622447435,
"Kickstart": 692635484,
"Kit": 188,
"Kotlin": 189,
"Kusto": 225697190,
"LFE": 190,
"LLVM": 191,
"LOLCODE": 192,
"LSL": 193,
"LTspice Symbol": 1013566805,
"LabVIEW": 194,
"Lark": 758480799,
"Lasso": 195,
"Latte": 196,
"Lean": 197,
"Lean 4": 455147478,
"Less": 198,
"Lex": 199,
"LigoLANG": 1040646257,
"LilyPond": 200,
"Limbo": 201,
"Linker Script": 202,
"Linux Kernel Module": 203,
"Liquid": 204,
"Literate Agda": 205,
"Literate CoffeeScript": 206,
"Literate Haskell": 207,
"LiveScript": 208,
"Logos": 209,
"Logtalk": 210,
"LookML": 211,
"LoomScript": 212,
"Lua": 213,
"Luau": 365050359,
"M": 214,
"M4": 215,
"M4Sugar": 216,
"MATLAB": 225,
"MAXScript": 217,
"MDX": 512838272,
"MLIR": 448253929,
"MQL4": 426,
"MQL5": 427,
"MTML": 218,
"MUF": 219,
"Macaulay2": 34167825,
"Makefile": 220,
"Mako": 221,
"Markdown": 222,
"Marko": 932782397,
"Mask": 223,
"Mathematica": 224,
"Maven POM": 226,
"Max": 227,
"Mercury": 229,
"Mermaid": 385992043,
"Meson": 799141244,
"Metal": 230,
"Microsoft Developer Studio Project": 800983837,
"Microsoft Visual Studio Solution": 849523096,
"MiniD": 231,
"MiniYAML": 4896465,
"Mint": 968740319,
"Mirah": 232,
"Modelica": 233,
"Modula-2": 234,
"Modula-3": 564743864,
"Module Management System": 235,
"Mojo": 1045019587,
"Monkey": 236,
"Monkey C": 231751931,
"Moocode": 237,
"MoonScript": 238,
"Motoko": 202937027,
"Motorola 68K Assembly": 477582706,
"Move": 638334599,
"Muse": 474864066,
"Mustache": 638334590,
"Myghty": 239,
"NASL": 171666519,
"NCL": 240,
"NEON": 481192983,
"NL": 241,
"NMODL": 136456478,
"NPM Config": 685022663,
"NSIS": 242,
"NWScript": 731233819,
"Nasal": 178322513,
"Nearley": 521429430,
"Nemerle": 243,
"NetLinx": 244,
"NetLinx+ERB": 245,
"NetLogo": 246,
"NewLisp": 247,
"Nextflow": 506780613,
"Nginx": 248,
"Nim": 249,
"Ninja": 250,
"Nit": 251,
"Nix": 252,
"Nu": 253,
"NumPy": 254,
"Nunjucks": 461856962,
"Nushell": 446573572,
"OASv2-json": 834374816,
"OASv2-yaml": 105187618,
"OASv3-json": 980062566,
"OASv3-yaml": 51239111,
"OCaml": 255,
"Oberon": 677210597,
"ObjDump": 256,
"Object Data Instance Notation": 985227236,
"ObjectScript": 202735509,
"Objective-C": 257,
"Objective-C++": 258,
"Objective-J": 259,
"Odin": 889244082,
"Omgrofl": 260,
"Opa": 261,
"Opal": 262,
"Open Policy Agent": 840483232,
"OpenAPI Specification v2": 848295328,
"OpenAPI Specification v3": 557959099,
"OpenCL": 263,
"OpenEdge ABL": 264,
"OpenQASM": 153739399,
"OpenRC runscript": 265,
"OpenSCAD": 266,
"OpenStep Property List": 598917541,
"OpenType Feature File": 374317347,
"Option List": 723589315,
"Org": 267,
"Ox": 268,
"Oxygene": 269,
"Oz": 270,
"P4": 348895984,
"PDDL": 736235603,
"PEG.js": 81442128,
"PHP": 272,
"PLSQL": 273,
"PLpgSQL": 274,
"POV-Ray SDL": 275,
"Pact": 756774415,
"Pan": 276,
"Papyrus": 277,
"Parrot": 278,
"Parrot Assembly": 279,
"Parrot Internal Representation": 280,
"Pascal": 281,
"Pawn": 271,
"Pep8": 840372442,
"Perl": 282,
"Pic": 425,
"Pickle": 284,
"PicoLisp": 285,
"PigLatin": 286,
"Pike": 287,
"Pip Requirements": 684385621,
"Pkl": 288822799,
"PlantUML": 833504686,
"Pod": 288,
"Pod 6": 155357471,
"PogoScript": 289,
"Polar": 839112914,
"Pony": 290,
"Portugol": 832391833,
"PostCSS": 262764437,
"PostScript": 291,
"PowerBuilder": 292,
"PowerShell": 293,
"Praat": 106029007,
"Prisma": 499933428,
"Processing": 294,
"Procfile": 305313959,
"Proguard": 716513858,
"Prolog": 295,
"Promela": 441858312,
"Propeller Spin": 296,
"Protocol Buffer": 297,
"Protocol Buffer Text Format": 436568854,
"Public Key": 298,
"Pug": 179,
"Puppet": 299,
"Pure Data": 300,
"PureBasic": 301,
"PureScript": 302,
"Pyret": 252961827,
"Python": 303,
"Python console": 428,
"Python traceback": 304,
"Q#": 697448245,
"QML": 305,
"QMake": 306,
"Qt Script": 558193693,
"Quake": 375265331,
"R": 307,
"RAML": 308,
"RBS": 899227493,
"RDoc": 309,
"REALbasic": 310,
"REXX": 311,
"RMarkdown": 313,
"RON": 587855233,
"RPC": 1031374237,
"RPGLE": 609977990,
"RPM Spec": 314,
"RUNOFF": 315,
"Racket": 316,
"Ragel": 317,
"Raku": 283,
"Rascal": 173616037,
"Raw token data": 318,
"ReScript": 501875647,
"Readline Config": 538732839,
"Reason": 869538413,
"ReasonLIGO": 319002153,
"Rebol": 319,
"Record Jar": 865765202,
"Red": 320,
"Redcode": 321,
"Redirect Rules": 1020148948,
"Regular Expression": 363378884,
"Ren'Py": 322,
"RenderScript": 323,
"Rez": 498022874,
"Rich Text Format": 51601661,
"Ring": 431,
"Riot": 878396783,
"RobotFramework": 324,
"Roc": 440182480,
"Roff": 141,
"Roff Manpage": 612669833,
"Rouge": 325,
"RouterOS Script": 592853203,
"Ruby": 326,
"Rust": 327,
"SAS": 328,
"SCSS": 329,
"SELinux Policy": 880010326,
"SMT": 330,
"SPARQL": 331,
"SQF": 332,
"SQL": 333,
"SQLPL": 334,
"SRecode Template": 335,
"SSH Config": 554920715,
"STAR": 424510560,
"STL": 455361735,
"STON": 336,
"SVG": 337,
"SWIG": 1066250075,
"Sage": 338,
"SaltStack": 339,
"Sass": 340,
"Scala": 341,
"Scaml": 342,
"Scenic": 619814037,
"Scheme": 343,
"Scilab": 344,
"Self": 345,
"ShaderLab": 664257356,
"Shell": 346,
"ShellCheck Config": 687511714,
"ShellSession": 347,
"Shen": 348,
"Sieve": 208976687,
"Simple File Verification": 735623761,
"Singularity": 987024632,
"Slash": 349,
"Slice": 894641667,
"Slim": 350,
"Slint": 119900149,
"SmPL": 164123055,
"Smali": 351,
"Smalltalk": 352,
"Smarty": 353,
"Smithy": 1027892786,
"Snakemake": 151241392,
"Solidity": 237469032,
"Soong": 222900098,
"SourcePawn": 354,
"Spline Font Database": 767169629,
"Squirrel": 355,
"Stan": 356,
"Standard ML": 357,
"Starlark": 960266174,
"Stata": 358,
"StringTemplate": 89855901,
"Stylus": 359,
"SubRip Text": 360,
"SugarSS": 826404698,
"SuperCollider": 361,
"Svelte": 928734530,
"Sway": 271471144,
"Sweave": 558779190,
"Swift": 362,
"SystemVerilog": 363,
"TI Program": 422,
"TL-Verilog": 118656070,
"TLA": 364,
"TOML": 365,
"TSQL": 918334941,
"TSV": 1035892117,
"TSX": 94901924,
"TXL": 366,
"Talon": 959889508,
"Tcl": 367,
"Tcsh": 368,
"TeX": 369,
"Tea": 370,
"Terra": 371,
"Terraform Template": 856832701,
"Texinfo": 988020015,
"Text": 372,
"TextGrid": 965696054,
"TextMate Properties": 981795023,
"Textile": 373,
"Thrift": 374,
"Toit": 356554395,
"Turing": 375,
"Turtle": 376,
"Twig": 377,
"Type Language": 632765617,
"TypeScript": 378,
"Typst": 704730682,
"Unified Parallel C": 379,
"Unity3D Asset": 380,
"Unix Assembly": 120,
"Uno": 381,
"UnrealScript": 382,
"UrWeb": 383,
"V": 603371597,
"VBA": 399230729,
"VBScript": 408016005,
"VCL": 384,
"VHDL": 385,
"Vala": 386,
"Valve Data Format": 544060961,
"Velocity Template Language": 292377326,
"Verilog": 387,
"Vim Help File": 508563686,
"Vim Script": 388,
"Vim Snippet": 81265970,
"Visual Basic .NET": 389,
"Visual Basic 6.0": 679594952,
"Volt": 390,
"Vue": 391,
"Vyper": 1055641948,
"WDL": 374521672,
"WGSL": 836605993,
"Wavefront Material": 392,
"Wavefront Object": 393,
"Web Ontology Language": 394,
"WebAssembly": 956556503,
"WebAssembly Interface Type": 134534086,
"WebIDL": 395,
"WebVTT": 658679714,
"Wget Config": 668457123,
"Whiley": 888779559,
"Wikitext": 228,
"Win32 Message File": 950967261,
"Windows Registry Entries": 969674868,
"Witcher Script": 686821385,
"Wollok": 632745969,
"World of Warcraft Addon Data": 396,
"Wren": 713580619,
"X BitMap": 782911107,
"X Font Directory Index": 208700028,
"X PixMap": 781846279,
"X10": 397,
"XC": 398,
"XCompose": 225167241,
"XML": 399,
"XML Property List": 75622871,
"XPages": 400,
"XProc": 401,
"XQuery": 402,
"XS": 403,
"XSLT": 404,
"Xojo": 405,
"Xonsh": 614078284,
"Xtend": 406,
"YAML": 407,
"YANG": 408,
"YARA": 805122868,
"YASnippet": 378760102,
"Yacc": 409,
"Yul": 237469033,
"ZAP": 952972794,
"ZIL": 973483626,
"Zeek": 40,
"ZenScript": 494938890,
"Zephir": 410,
"Zig": 646424281,
"Zimpl": 411,
"cURL Config": 992375436,
"crontab": 705203557,
"desktop": 412,
"dircolors": 691605112,
"eC": 413,
"edn": 414,
"fish": 415,
"hoon": 560883276,
"jq": 905371884,
"kvlang": 970675279,
"mIRC Script": 517654727,
"mcfunction": 462488745,
"mupad": 416,
"nanorc": 775996197,
"nesC": 417,
"ooc": 418,
"q": 970539067,
"reStructuredText": 419,
"robots.txt": 674736065,
"sed": 847830017,
"templ": 795579337,
"wisp": 420,
"xBase": 421,
}

160
go-enry/data/interpreter.go Normal file
View File

@ -0,0 +1,160 @@
// Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 42fd3c2514375fc6ad281552368edd3fb9f6ee7f
package data
var LanguagesByInterpreter = map[string][]string{
"M2": {"Macaulay2"},
"RouterOS": {"RouterOS Script"},
"Rscript": {"R"},
"aidl": {"AIDL"},
"apl": {"APL"},
"aplx": {"APL"},
"ash": {"Shell"},
"asy": {"Asymptote"},
"awk": {"Awk"},
"bash": {"Shell"},
"bb": {"Clojure"},
"bigloo": {"Scheme"},
"boogie": {"Boogie"},
"boolector": {"SMT"},
"ccl": {"Common Lisp"},
"chakra": {"JavaScript"},
"chicken": {"Scheme"},
"clisp": {"Common Lisp"},
"coffee": {"CoffeeScript"},
"cperl": {"Perl"},
"crystal": {"Crystal"},
"csh": {"Tcsh"},
"csi": {"Scheme"},
"cvc4": {"SMT"},
"cwl-runner": {"Common Workflow Language"},
"d8": {"JavaScript"},
"dafny": {"Dafny"},
"dart": {"Dart"},
"dash": {"Shell"},
"deno": {"TypeScript"},
"dtrace": {"DTrace"},
"dyalog": {"APL"},
"ecl": {"Common Lisp"},
"elixir": {"Elixir"},
"elvish": {"Elvish"},
"escript": {"Erlang"},
"eui": {"Euphoria"},
"euiw": {"Euphoria"},
"fennel": {"Fennel"},
"fish": {"fish"},
"gawk": {"Awk"},
"gerbv": {"Gerber Image"},
"gerbview": {"Gerber Image"},
"gjs": {"JavaScript"},
"gn": {"GN"},
"gnuplot": {"Gnuplot"},
"gojq": {"jq"},
"gosh": {"Scheme"},
"groovy": {"Groovy"},
"gsed": {"sed"},
"guile": {"Scheme"},
"hy": {"Hy"},
"instantfpc": {"Pascal"},
"io": {"Io"},
"ioke": {"Ioke"},
"janet": {"Janet"},
"jaq": {"jq"},
"jconsole": {"J"},
"jolie": {"Jolie"},
"jq": {"jq"},
"jqjq": {"jq"},
"jqq": {"jq"},
"jruby": {"Ruby"},
"js": {"JavaScript"},
"julia": {"Julia"},
"ksh": {"Shell"},
"lisp": {"Common Lisp"},
"lsl": {"LSL"},
"lua": {"Lua", "Terra"},
"luau": {"Luau"},
"macruby": {"Ruby"},
"make": {"Makefile"},
"makeinfo": {"Texinfo"},
"mathsat5": {"SMT"},
"mawk": {"Awk"},
"minised": {"sed"},
"mksh": {"Shell"},
"mmi": {"Mercury"},
"moon": {"MoonScript"},
"nawk": {"Awk"},
"newlisp": {"NewLisp"},
"nextflow": {"Nextflow"},
"node": {"JavaScript"},
"nodejs": {"JavaScript"},
"nu": {"Nushell"},
"nush": {"Nu"},
"ocaml": {"OCaml", "ReScript"},
"ocamlrun": {"OCaml"},
"ocamlscript": {"OCaml"},
"openrc-run": {"OpenRC runscript"},
"opensmt": {"SMT"},
"osascript": {"AppleScript"},
"parrot": {"Parrot Assembly", "Parrot Internal Representation"},
"pdksh": {"Shell"},
"perl": {"Perl", "Pod"},
"perl6": {"Pod 6", "Raku"},
"php": {"PHP"},
"picolisp": {"PicoLisp"},
"pike": {"Pike"},
"pil": {"PicoLisp"},
"pkl": {"Pkl"},
"pwsh": {"PowerShell"},
"py": {"Python"},
"pypy": {"Python"},
"pypy3": {"Python"},
"python": {"Python"},
"python2": {"Python"},
"python3": {"Python"},
"qjs": {"JavaScript"},
"qmake": {"QMake"},
"query-json": {"jq"},
"r6rs": {"Scheme"},
"racket": {"Racket"},
"rake": {"Ruby"},
"raku": {"Raku"},
"rakudo": {"Raku"},
"rbx": {"Ruby"},
"rc": {"Shell"},
"regina": {"REXX"},
"rexx": {"REXX"},
"rhino": {"JavaScript"},
"ruby": {"Ruby"},
"rune": {"E"},
"runghc": {"Haskell"},
"runhaskell": {"Haskell"},
"runhugs": {"Haskell"},
"rust-script": {"Rust"},
"sbcl": {"Common Lisp"},
"scala": {"Scala"},
"scenic": {"Scenic"},
"scheme": {"Scheme"},
"sclang": {"SuperCollider"},
"scsynth": {"SuperCollider"},
"sed": {"sed"},
"sh": {"Shell"},
"smt-rat": {"SMT"},
"smtinterpol": {"SMT"},
"ssed": {"sed"},
"stp": {"SMT"},
"swipl": {"Prolog"},
"tcc": {"C"},
"tclsh": {"Tcl"},
"tcsh": {"Tcsh"},
"ts-node": {"TypeScript"},
"tsx": {"TypeScript"},
"v8": {"JavaScript"},
"v8-shell": {"JavaScript"},
"verit": {"SMT"},
"wish": {"Tcl"},
"yap": {"Prolog"},
"yices2": {"SMT"},
"z3": {"SMT"},
"zsh": {"Shell"},
}

16034
go-enry/data/languageInfo.go Normal file

File diff suppressed because it is too large Load Diff

282
go-enry/data/mimeType.go Normal file
View File

@ -0,0 +1,282 @@
// Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 42fd3c2514375fc6ad281552368edd3fb9f6ee7f
package data
var LanguagesMime = map[string]string{
"AGS Script": "text/x-c++src",
"APL": "text/apl",
"ASN.1": "text/x-ttcn-asn",
"ASP.NET": "application/x-aspx",
"Alpine Abuild": "text/x-sh",
"AngelScript": "text/x-c++src",
"Ant Build System": "application/xml",
"Apex": "text/x-java",
"Astro": "text/jsx",
"Asymptote": "text/x-kotlin",
"Beef": "text/x-csharp",
"BibTeX": "text/x-stex",
"Bikeshed": "text/html",
"Bluespec": "text/x-systemverilog",
"Bluespec BH": "text/x-haskell",
"Brainfuck": "text/x-brainfuck",
"C": "text/x-csrc",
"C#": "text/x-csharp",
"C++": "text/x-c++src",
"C2hs Haskell": "text/x-haskell",
"CMake": "text/x-cmake",
"COBOL": "text/x-cobol",
"COLLADA": "text/xml",
"CSON": "text/x-coffeescript",
"CSS": "text/css",
"Cabal Config": "text/x-haskell",
"CameLIGO": "text/x-ocaml",
"ChucK": "text/x-java",
"Clojure": "text/x-clojure",
"Closure Templates": "text/x-soy",
"Cloud Firestore Security Rules": "text/css",
"CoffeeScript": "text/x-coffeescript",
"Common Lisp": "text/x-common-lisp",
"Common Workflow Language": "text/x-yaml",
"Component Pascal": "text/x-pascal",
"Crystal": "text/x-crystal",
"Cuda": "text/x-c++src",
"Cycript": "text/javascript",
"Cython": "text/x-cython",
"D": "text/x-d",
"DTrace": "text/x-csrc",
"Dart": "application/dart",
"DenizenScript": "text/x-yaml",
"Dhall": "text/x-haskell",
"Diff": "text/x-diff",
"Dockerfile": "text/x-dockerfile",
"Dylan": "text/x-dylan",
"E-mail": "application/mbox",
"EBNF": "text/x-ebnf",
"ECL": "text/x-ecl",
"EQ": "text/x-csharp",
"Eagle": "text/xml",
"Easybuild": "text/x-python",
"Ecere Projects": "application/json",
"Ecmarkup": "text/html",
"EditorConfig": "text/x-properties",
"Edje Data Collection": "text/x-c++src",
"Eiffel": "text/x-eiffel",
"Elm": "text/x-elm",
"Emacs Lisp": "text/x-common-lisp",
"EmberScript": "text/x-coffeescript",
"Erlang": "text/x-erlang",
"F#": "text/x-fsharp",
"Factor": "text/x-factor",
"Forth": "text/x-forth",
"Fortran": "text/x-fortran",
"Fortran Free Form": "text/x-fortran",
"FreeBasic": "text/x-vb",
"GCC Machine Description": "text/x-common-lisp",
"GN": "text/x-python",
"GSC": "text/x-csrc",
"Game Maker Language": "text/x-c++src",
"Genshi": "text/xml",
"Gentoo Ebuild": "text/x-sh",
"Gentoo Eclass": "text/x-sh",
"Git Attributes": "text/x-sh",
"Git Config": "text/x-properties",
"Glyph": "text/x-tcl",
"Go": "text/x-go",
"Grammatical Framework": "text/x-haskell",
"Groovy": "text/x-groovy",
"Groovy Server Pages": "application/x-jsp",
"HCL": "text/x-ruby",
"HTML": "text/html",
"HTML+ECR": "text/html",
"HTML+EEX": "text/html",
"HTML+ERB": "application/x-erb",
"HTML+PHP": "application/x-httpd-php",
"HTML+Razor": "text/html",
"HTTP": "message/http",
"Hack": "application/x-httpd-php",
"Haml": "text/x-haml",
"Haskell": "text/x-haskell",
"Haxe": "text/x-haxe",
"HolyC": "text/x-csrc",
"IDL": "text/x-idl",
"INI": "text/x-properties",
"IRC log": "text/mirc",
"Ignore List": "text/x-sh",
"JSON": "application/json",
"JSON with Comments": "text/javascript",
"JSON5": "application/json",
"JSONLD": "application/json",
"JSONiq": "application/json",
"Janet": "text/x-scheme",
"Java": "text/x-java",
"Java Properties": "text/x-properties",
"Java Server Pages": "application/x-jsp",
"JavaScript": "text/javascript",
"JavaScript+ERB": "application/javascript",
"Jest Snapshot": "application/javascript",
"JetBrains MPS": "text/xml",
"Jinja": "text/x-django",
"Julia": "text/x-julia",
"Jupyter Notebook": "application/json",
"Kaitai Struct": "text/x-yaml",
"KiCad Layout": "text/x-common-lisp",
"Kit": "text/html",
"Kotlin": "text/x-kotlin",
"LFE": "text/x-common-lisp",
"LTspice Symbol": "text/x-spreadsheet",
"LabVIEW": "text/xml",
"Lark": "text/x-ebnf",
"Latte": "text/x-smarty",
"Less": "text/css",
"LigoLANG": "text/x-pascal",
"Literate Haskell": "text/x-literate-haskell",
"LiveScript": "text/x-livescript",
"LookML": "text/x-yaml",
"Lua": "text/x-lua",
"Luau": "text/x-lua",
"M": "text/x-mumps",
"MATLAB": "text/x-octave",
"MDX": "text/x-gfm",
"MTML": "text/html",
"MUF": "text/x-forth",
"Makefile": "text/x-cmake",
"Markdown": "text/x-gfm",
"Marko": "text/html",
"Mathematica": "text/x-mathematica",
"Maven POM": "text/xml",
"Max": "application/json",
"Metal": "text/x-c++src",
"MiniYAML": "text/x-yaml",
"Mirah": "text/x-ruby",
"Modelica": "text/x-modelica",
"Mojo": "text/x-python",
"Monkey C": "text/x-csrc",
"Mustache": "text/x-smarty",
"NSIS": "text/x-nsis",
"NWScript": "text/x-csrc",
"NetLogo": "text/x-common-lisp",
"NewLisp": "text/x-common-lisp",
"Nginx": "text/x-nginx-conf",
"Nu": "text/x-scheme",
"NumPy": "text/x-python",
"Nushell": "text/x-sh",
"OASv2-json": "application/json",
"OASv2-yaml": "text/x-yaml",
"OASv3-json": "application/json",
"OASv3-yaml": "text/x-yaml",
"OCaml": "text/x-ocaml",
"Objective-C": "text/x-objectivec",
"Objective-C++": "text/x-objectivec",
"OpenCL": "text/x-csrc",
"OpenRC runscript": "text/x-sh",
"Option List": "text/x-sh",
"Oz": "text/x-oz",
"PEG.js": "text/javascript",
"PHP": "application/x-httpd-php",
"PLSQL": "text/x-plsql",
"PLpgSQL": "text/x-sql",
"Pascal": "text/x-pascal",
"Perl": "text/x-perl",
"Pic": "text/troff",
"Pod": "text/x-perl",
"PowerShell": "application/x-powershell",
"Protocol Buffer": "text/x-protobuf",
"Public Key": "application/pgp",
"Pug": "text/x-pug",
"Puppet": "text/x-puppet",
"PureScript": "text/x-haskell",
"Python": "text/x-python",
"Qt Script": "text/javascript",
"R": "text/x-rsrc",
"RAML": "text/x-yaml",
"RBS": "text/x-ruby",
"RMarkdown": "text/x-gfm",
"RPM Spec": "text/x-rpm-spec",
"Raku": "text/x-perl",
"ReScript": "text/x-rustsrc",
"Reason": "text/x-rustsrc",
"ReasonLIGO": "text/x-rustsrc",
"Record Jar": "text/x-properties",
"Roff": "text/troff",
"Roff Manpage": "text/troff",
"Rouge": "text/x-clojure",
"Ruby": "text/x-ruby",
"Rust": "text/x-rustsrc",
"SAS": "text/x-sas",
"SCSS": "text/x-scss",
"SPARQL": "application/sparql-query",
"SQL": "text/x-sql",
"SQLPL": "text/x-sql",
"SRecode Template": "text/x-common-lisp",
"SVG": "text/xml",
"SWIG": "text/x-c++src",
"Sage": "text/x-python",
"SaltStack": "text/x-yaml",
"Sass": "text/x-sass",
"Scala": "text/x-scala",
"Scheme": "text/x-scheme",
"Shell": "text/x-sh",
"ShellCheck Config": "text/x-properties",
"ShellSession": "text/x-sh",
"Sieve": "application/sieve",
"Simple File Verification": "text/x-properties",
"Slim": "text/x-slim",
"Smalltalk": "text/x-stsrc",
"Smarty": "text/x-smarty",
"Smithy": "text/x-csrc",
"Snakemake": "text/x-python",
"Squirrel": "text/x-c++src",
"Standard ML": "text/x-ocaml",
"Starlark": "text/x-python",
"StringTemplate": "text/html",
"Svelte": "text/html",
"Sway": "text/x-rustsrc",
"Swift": "text/x-swift",
"SystemVerilog": "text/x-systemverilog",
"TOML": "text/x-toml",
"TSX": "text/jsx",
"Tcl": "text/x-tcl",
"Tcsh": "text/x-sh",
"TeX": "text/x-stex",
"Terra": "text/x-lua",
"Terraform Template": "text/x-ruby",
"TextMate Properties": "text/x-properties",
"Textile": "text/x-textile",
"Turtle": "text/turtle",
"Twig": "text/x-twig",
"TypeScript": "application/typescript",
"Unified Parallel C": "text/x-csrc",
"Unity3D Asset": "text/x-yaml",
"Uno": "text/x-csharp",
"UnrealScript": "text/x-java",
"V": "text/x-go",
"VBA": "text/x-vb",
"VBScript": "text/vbscript",
"VHDL": "text/x-vhdl",
"Velocity Template Language": "text/velocity",
"Verilog": "text/x-verilog",
"Visual Basic .NET": "text/x-vb",
"Visual Basic 6.0": "text/x-vb",
"Volt": "text/x-d",
"WebAssembly": "text/x-common-lisp",
"WebAssembly Interface Type": "text/x-webidl",
"WebIDL": "text/x-webidl",
"Win32 Message File": "text/x-properties",
"Windows Registry Entries": "text/x-properties",
"X BitMap": "text/x-csrc",
"X PixMap": "text/x-csrc",
"XC": "text/x-csrc",
"XML": "text/xml",
"XML Property List": "text/xml",
"XPages": "text/xml",
"XProc": "text/xml",
"XQuery": "application/xquery",
"XS": "text/x-csrc",
"XSLT": "text/xml",
"Xonsh": "text/x-python",
"YAML": "text/x-yaml",
"edn": "text/x-clojure",
"reStructuredText": "text/x-rst",
"wisp": "text/x-clojure",
}

133
go-enry/data/rule/rule.go Normal file
View File

@ -0,0 +1,133 @@
// Package rule contains rule-based heuristic implementations.
// It is used in the generated code in content.go for disambiguation of languages
// with colliding extensions, based on regexps from Linguist data.
package rule
import "github.com/go-enry/go-enry/v2/regex"
// Matcher checks if the data matches (number of) pattern(s).
// Every heuristic rule below implements this interface.
// A regexp.Regexp satisfies this interface and can be used instead.
type Matcher interface {
Match(data []byte) bool
}
// Heuristic consist of (a number of) rules where each, if matches,
// identifies content as belonging to a programming language(s).
type Heuristic interface {
Matcher
Languages() []string
}
// languages base struct with all the languages that a Matcher identifies.
type languages struct {
langs []string
}
// Languages returns all languages, identified by this Matcher.
func (l languages) Languages() []string {
return l.langs
}
// MatchingLanguages is a helper to create new languages.
func MatchingLanguages(langs ...string) languages {
return languages{langs}
}
func noLanguages() languages {
return MatchingLanguages([]string{}...)
}
// Implements a Heuristic.
type or struct {
languages
pattern Matcher
}
// Or rule matches, if a single matching pattern exists.
// It receives only one pattern as it relies on optimization that
// represtes union with | inside a single regexp during code generation.
func Or(l languages, p Matcher) Heuristic {
//FIXME(bzz): this will not be the case as only some of the patterns may
// be non-RE2 => we shouldn't collate them not to loose the (accuracty of) whole rule
return or{l, p}
}
// Match implements rule.Matcher.
func (r or) Match(data []byte) bool {
if runOnRE2AndRegexNotAccepted(r.pattern) {
return false
}
return r.pattern.Match(data)
}
// Implements a Heuristic.
type and struct {
languages
patterns []Matcher
}
// And rule matches, if each of the patterns does match.
func And(l languages, m ...Matcher) Heuristic {
return and{l, m}
}
// Match implements data.Matcher.
func (r and) Match(data []byte) bool {
for _, p := range r.patterns {
if runOnRE2AndRegexNotAccepted(p) {
continue
}
if !p.Match(data) {
return false
}
}
return true
}
// Implements a Heuristic.
type not struct {
languages
Patterns []Matcher
}
// Not rule matches if none of the patterns match.
func Not(l languages, r ...Matcher) Heuristic {
return not{l, r}
}
// Match implements data.Matcher.
func (r not) Match(data []byte) bool {
for _, p := range r.Patterns {
if runOnRE2AndRegexNotAccepted(p) {
continue
}
if p.Match(data) {
return false
}
}
return true
}
// Implements a Heuristic.
type always struct {
languages
}
// Always rule always matches. Often is used as a default fallback.
func Always(l languages) Heuristic {
return always{l}
}
// Match implements Matcher.
func (r always) Match(data []byte) bool {
return true
}
// Checks if a regex syntax isn't accepted by RE2 engine.
// It's nil by construction from regex.MustCompileRuby but
// is used here as a Matcher interface wich itself is non-nil.
func runOnRE2AndRegexNotAccepted(re Matcher) bool {
v, ok := re.(regex.EnryRegexp)
return ok && v == nil
}

View File

@ -0,0 +1,71 @@
package rule
import (
"testing"
"github.com/go-enry/go-enry/v2/regex"
"github.com/stretchr/testify/assert"
)
const lang = "ActionScript"
type fixture struct {
name string
rule Heuristic
numLangs int
match string
noMatch string
}
var specificFixtures = map[string][]fixture{
"": { // cases that don't vary between the engines
{"Always", Always(MatchingLanguages(lang)), 1, "a", ""},
{"Not", Not(MatchingLanguages(lang), regex.MustCompile(`a`)), 1, "b", "a"},
{"And", And(MatchingLanguages(lang), regex.MustCompile(`a`), regex.MustCompile(`b`)), 1, "ab", "a"},
{"Or", Or(MatchingLanguages(lang), regex.MustCompile(`a|b`)), 1, "ab", "c"},
// the results of these depend on the regex engine
// {"NilOr", Or(noLanguages(), regex.MustCompileRuby(``)), 0, "", "a"},
// {"NilNot", Not(noLanguages(), regex.MustCompileRuby(`a`)), 0, "", "a"},
},
regex.RE2: {
{"NilAnd", And(noLanguages(), regex.MustCompileRuby(`a`), regex.MustCompile(`b`)), 0, "b", "a"},
{"NilNot", Not(noLanguages(), regex.MustCompileRuby(`a`), regex.MustCompile(`b`)), 0, "c", "b"},
},
regex.Oniguruma: {
{"NilAnd", And(noLanguages(), regex.MustCompileRuby(`a`), regex.MustCompile(`b`)), 0, "ab", "c"},
{"NilNot", Not(noLanguages(), regex.MustCompileRuby(`a`), regex.MustCompile(`b`)), 0, "c", "a"},
{"NilOr", Or(noLanguages(), regex.MustCompileRuby(`a`) /*, regexp.MustCompile(`b`)*/), 0, "a", "b"},
},
}
func testRulesForEngine(t *testing.T, engine string) {
if engine != "" && regex.Name != engine {
return
}
for _, f := range specificFixtures[engine] {
t.Run(engine+f.name, func(t *testing.T) {
check(t, f)
})
}
}
func TestRules(t *testing.T) {
//TODO(bzz): can all be run in parallel
testRulesForEngine(t, "")
testRulesForEngine(t, regex.RE2)
testRulesForEngine(t, regex.Oniguruma)
}
func check(t *testing.T, f fixture) {
assert.NotNil(t, f.rule)
assert.NotNil(t, f.rule.Languages())
assert.Equal(t, f.numLangs, len(f.rule.Languages()))
if f.match != "" {
assert.Truef(t, f.rule.Match([]byte(f.match)),
"'%s' is expected to .Match() by rule %s%v", f.match, f.name, f.rule)
}
if f.noMatch != "" {
assert.Falsef(t, f.rule.Match([]byte(f.noMatch)),
"'%s' is expected NOT to .Match() by rule %s%v", f.noMatch, f.name, f.rule)
}
}

17
go-enry/data/test.go Normal file
View File

@ -0,0 +1,17 @@
package data
import "github.com/go-enry/go-enry/v2/regex"
// TestMatchers is hand made collection of regexp used by the function `enry.IsTest`
// to identify test files in different languages.
var TestMatchers = []regex.EnryRegexp{
regex.MustCompile(`(^|/)tests/.*Test\.php$`),
regex.MustCompile(`(^|/)test/.*Test(s?)\.java$`),
regex.MustCompile(`(^|/)test(/|/.*/)Test.*\.java$`),
regex.MustCompile(`(^|/)test/.*(Test(s?)|Spec(s?))\.scala$`),
regex.MustCompile(`(^|/)test_.*\.py$`),
regex.MustCompile(`(^|/).*_test\.go$`),
regex.MustCompile(`(^|/).*_(test|spec)\.rb$`),
regex.MustCompile(`(^|/).*Test(s?)\.cs$`),
regex.MustCompile(`(^|/).*\.(test|spec)\.(ts|tsx|js)$`),
}

779
go-enry/data/type.go Normal file
View File

@ -0,0 +1,779 @@
// Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 42fd3c2514375fc6ad281552368edd3fb9f6ee7f
package data
// Type represent language's type. Either data, programming, markup, prose, or unknown.
type Type int
// Type's values.
const (
TypeUnknown Type = iota
TypeData
TypeProgramming
TypeMarkup
TypeProse
)
func (t Type) String() string {
switch t {
case TypeData:
return "data"
case TypeProgramming:
return "programming"
case TypeMarkup:
return "markup"
case TypeProse:
return "prose"
default:
return "unknown"
}
}
func TypeForString(s string) Type {
switch s {
case "data":
return TypeData
case "programming":
return TypeProgramming
case "markup":
return TypeMarkup
case "prose":
return TypeProse
default:
return TypeUnknown
}
}
var LanguagesType = map[string]int{
"1C Enterprise": 2,
"2-Dimensional Array": 1,
"4D": 2,
"ABAP": 2,
"ABAP CDS": 2,
"ABNF": 1,
"AGS Script": 2,
"AIDL": 2,
"AL": 2,
"AMPL": 2,
"ANTLR": 2,
"API Blueprint": 3,
"APL": 2,
"ASL": 2,
"ASN.1": 1,
"ASP.NET": 2,
"ATS": 2,
"ActionScript": 2,
"Ada": 2,
"Adblock Filter List": 1,
"Adobe Font Metrics": 1,
"Agda": 2,
"Alloy": 2,
"Alpine Abuild": 2,
"Altium Designer": 1,
"AngelScript": 2,
"Ant Build System": 1,
"Antlers": 3,
"ApacheConf": 1,
"Apex": 2,
"Apollo Guidance Computer": 2,
"AppleScript": 2,
"Arc": 2,
"AsciiDoc": 4,
"AspectJ": 2,
"Assembly": 2,
"Astro": 3,
"Asymptote": 2,
"Augeas": 2,
"AutoHotkey": 2,
"AutoIt": 2,
"Avro IDL": 1,
"Awk": 2,
"BASIC": 2,
"BQN": 2,
"Ballerina": 2,
"Batchfile": 2,
"Beef": 2,
"Befunge": 2,
"Berry": 2,
"BibTeX": 3,
"Bicep": 2,
"Bikeshed": 3,
"Bison": 2,
"BitBake": 2,
"Blade": 3,
"BlitzBasic": 2,
"BlitzMax": 2,
"Bluespec": 2,
"Bluespec BH": 2,
"Boo": 2,
"Boogie": 2,
"Brainfuck": 2,
"BrighterScript": 2,
"Brightscript": 2,
"Browserslist": 1,
"C": 2,
"C#": 2,
"C++": 2,
"C-ObjDump": 1,
"C2hs Haskell": 2,
"CAP CDS": 2,
"CIL": 1,
"CLIPS": 2,
"CMake": 2,
"COBOL": 2,
"CODEOWNERS": 1,
"COLLADA": 1,
"CSON": 1,
"CSS": 3,
"CSV": 1,
"CUE": 2,
"CWeb": 2,
"Cabal Config": 1,
"Caddyfile": 1,
"Cadence": 2,
"Cairo": 2,
"CameLIGO": 2,
"Cap'n Proto": 2,
"CartoCSS": 2,
"Ceylon": 2,
"Chapel": 2,
"Charity": 2,
"Checksums": 1,
"ChucK": 2,
"Circom": 2,
"Cirru": 2,
"Clarion": 2,
"Clarity": 2,
"Classic ASP": 2,
"Clean": 2,
"Click": 2,
"Clojure": 2,
"Closure Templates": 3,
"Cloud Firestore Security Rules": 1,
"CoNLL-U": 1,
"CodeQL": 2,
"CoffeeScript": 2,
"ColdFusion": 2,
"ColdFusion CFC": 2,
"Common Lisp": 2,
"Common Workflow Language": 2,
"Component Pascal": 2,
"Cool": 2,
"Coq": 2,
"Cpp-ObjDump": 1,
"Creole": 4,
"Crystal": 2,
"Csound": 2,
"Csound Document": 2,
"Csound Score": 2,
"Cuda": 2,
"Cue Sheet": 1,
"Curry": 2,
"Cycript": 2,
"Cypher": 2,
"Cython": 2,
"D": 2,
"D-ObjDump": 1,
"D2": 3,
"DIGITAL Command Language": 2,
"DM": 2,
"DNS Zone": 1,
"DTrace": 2,
"Dafny": 2,
"Darcs Patch": 1,
"Dart": 2,
"DataWeave": 2,
"Debian Package Control File": 1,
"DenizenScript": 2,
"Dhall": 2,
"Diff": 1,
"DirectX 3D File": 1,
"Dockerfile": 2,
"Dogescript": 2,
"Dotenv": 1,
"Dylan": 2,
"E": 2,
"E-mail": 1,
"EBNF": 1,
"ECL": 2,
"ECLiPSe": 2,
"EJS": 3,
"EQ": 2,
"Eagle": 1,
"Earthly": 2,
"Easybuild": 1,
"Ecere Projects": 1,
"Ecmarkup": 3,
"Edge": 3,
"EdgeQL": 2,
"EditorConfig": 1,
"Edje Data Collection": 1,
"Eiffel": 2,
"Elixir": 2,
"Elm": 2,
"Elvish": 2,
"Elvish Transcript": 2,
"Emacs Lisp": 2,
"EmberScript": 2,
"Erlang": 2,
"Euphoria": 2,
"F#": 2,
"F*": 2,
"FIGlet Font": 1,
"FIRRTL": 2,
"FLUX": 2,
"Factor": 2,
"Fancy": 2,
"Fantom": 2,
"Faust": 2,
"Fennel": 2,
"Filebench WML": 2,
"Filterscript": 2,
"Fluent": 2,
"Formatted": 1,
"Forth": 2,
"Fortran": 2,
"Fortran Free Form": 2,
"FreeBasic": 2,
"FreeMarker": 2,
"Frege": 2,
"Futhark": 2,
"G-code": 2,
"GAML": 2,
"GAMS": 2,
"GAP": 2,
"GCC Machine Description": 2,
"GDB": 2,
"GDScript": 2,
"GEDCOM": 1,
"GLSL": 2,
"GN": 1,
"GSC": 2,
"Game Maker Language": 2,
"Gemfile.lock": 1,
"Gemini": 4,
"Genero 4gl": 2,
"Genero per": 3,
"Genie": 2,
"Genshi": 2,
"Gentoo Ebuild": 2,
"Gentoo Eclass": 2,
"Gerber Image": 1,
"Gettext Catalog": 4,
"Gherkin": 2,
"Git Attributes": 1,
"Git Config": 1,
"Git Revision List": 1,
"Gleam": 2,
"Glimmer JS": 2,
"Glimmer TS": 2,
"Glyph": 2,
"Glyph Bitmap Distribution Format": 1,
"Gnuplot": 2,
"Go": 2,
"Go Checksums": 1,
"Go Module": 1,
"Go Workspace": 1,
"Godot Resource": 1,
"Golo": 2,
"Gosu": 2,
"Grace": 2,
"Gradle": 1,
"Gradle Kotlin DSL": 1,
"Grammatical Framework": 2,
"Graph Modeling Language": 1,
"GraphQL": 1,
"Graphviz (DOT)": 1,
"Groovy": 2,
"Groovy Server Pages": 2,
"HAProxy": 1,
"HCL": 2,
"HLSL": 2,
"HOCON": 1,
"HTML": 3,
"HTML+ECR": 3,
"HTML+EEX": 3,
"HTML+ERB": 3,
"HTML+PHP": 3,
"HTML+Razor": 3,
"HTTP": 1,
"HXML": 1,
"Hack": 2,
"Haml": 3,
"Handlebars": 3,
"Harbour": 2,
"Haskell": 2,
"Haxe": 2,
"HiveQL": 2,
"HolyC": 2,
"Hosts File": 1,
"Hy": 2,
"HyPhy": 2,
"IDL": 2,
"IGOR Pro": 2,
"INI": 1,
"IRC log": 1,
"Idris": 2,
"Ignore List": 1,
"ImageJ Macro": 2,
"Imba": 2,
"Inform 7": 2,
"Ink": 2,
"Inno Setup": 2,
"Io": 2,
"Ioke": 2,
"Isabelle": 2,
"Isabelle ROOT": 2,
"J": 2,
"JAR Manifest": 1,
"JCL": 2,
"JFlex": 2,
"JSON": 1,
"JSON with Comments": 1,
"JSON5": 1,
"JSONLD": 1,
"JSONiq": 2,
"Janet": 2,
"Jasmin": 2,
"Java": 2,
"Java Properties": 1,
"Java Server Pages": 2,
"JavaScript": 2,
"JavaScript+ERB": 2,
"Jest Snapshot": 1,
"JetBrains MPS": 2,
"Jinja": 3,
"Jison": 2,
"Jison Lex": 2,
"Jolie": 2,
"Jsonnet": 2,
"Julia": 2,
"Julia REPL": 2,
"Jupyter Notebook": 3,
"Just": 2,
"KRL": 2,
"Kaitai Struct": 2,
"KakouneScript": 2,
"KerboScript": 2,
"KiCad Layout": 1,
"KiCad Legacy Layout": 1,
"KiCad Schematic": 1,
"Kickstart": 1,
"Kit": 3,
"Kotlin": 2,
"Kusto": 1,
"LFE": 2,
"LLVM": 2,
"LOLCODE": 2,
"LSL": 2,
"LTspice Symbol": 1,
"LabVIEW": 2,
"Lark": 1,
"Lasso": 2,
"Latte": 3,
"Lean": 2,
"Lean 4": 2,
"Less": 3,
"Lex": 2,
"LigoLANG": 2,
"LilyPond": 2,
"Limbo": 2,
"Linker Script": 1,
"Linux Kernel Module": 1,
"Liquid": 3,
"Literate Agda": 2,
"Literate CoffeeScript": 2,
"Literate Haskell": 2,
"LiveScript": 2,
"Logos": 2,
"Logtalk": 2,
"LookML": 2,
"LoomScript": 2,
"Lua": 2,
"Luau": 2,
"M": 2,
"M4": 2,
"M4Sugar": 2,
"MATLAB": 2,
"MAXScript": 2,
"MDX": 3,
"MLIR": 2,
"MQL4": 2,
"MQL5": 2,
"MTML": 3,
"MUF": 2,
"Macaulay2": 2,
"Makefile": 2,
"Mako": 2,
"Markdown": 4,
"Marko": 3,
"Mask": 3,
"Mathematica": 2,
"Maven POM": 1,
"Max": 2,
"Mercury": 2,
"Mermaid": 3,
"Meson": 2,
"Metal": 2,
"Microsoft Developer Studio Project": 1,
"Microsoft Visual Studio Solution": 1,
"MiniD": 2,
"MiniYAML": 1,
"Mint": 2,
"Mirah": 2,
"Modelica": 2,
"Modula-2": 2,
"Modula-3": 2,
"Module Management System": 2,
"Mojo": 2,
"Monkey": 2,
"Monkey C": 2,
"Moocode": 2,
"MoonScript": 2,
"Motoko": 2,
"Motorola 68K Assembly": 2,
"Move": 2,
"Muse": 4,
"Mustache": 3,
"Myghty": 2,
"NASL": 2,
"NCL": 2,
"NEON": 1,
"NL": 1,
"NMODL": 2,
"NPM Config": 1,
"NSIS": 2,
"NWScript": 2,
"Nasal": 2,
"Nearley": 2,
"Nemerle": 2,
"NetLinx": 2,
"NetLinx+ERB": 2,
"NetLogo": 2,
"NewLisp": 2,
"Nextflow": 2,
"Nginx": 1,
"Nim": 2,
"Ninja": 1,
"Nit": 2,
"Nix": 2,
"Nu": 2,
"NumPy": 2,
"Nunjucks": 3,
"Nushell": 2,
"OASv2-json": 1,
"OASv2-yaml": 1,
"OASv3-json": 1,
"OASv3-yaml": 1,
"OCaml": 2,
"Oberon": 2,
"ObjDump": 1,
"Object Data Instance Notation": 1,
"ObjectScript": 2,
"Objective-C": 2,
"Objective-C++": 2,
"Objective-J": 2,
"Odin": 2,
"Omgrofl": 2,
"Opa": 2,
"Opal": 2,
"Open Policy Agent": 2,
"OpenAPI Specification v2": 1,
"OpenAPI Specification v3": 1,
"OpenCL": 2,
"OpenEdge ABL": 2,
"OpenQASM": 2,
"OpenRC runscript": 2,
"OpenSCAD": 2,
"OpenStep Property List": 1,
"OpenType Feature File": 1,
"Option List": 1,
"Org": 4,
"Ox": 2,
"Oxygene": 2,
"Oz": 2,
"P4": 2,
"PDDL": 2,
"PEG.js": 2,
"PHP": 2,
"PLSQL": 2,
"PLpgSQL": 2,
"POV-Ray SDL": 2,
"Pact": 2,
"Pan": 2,
"Papyrus": 2,
"Parrot": 2,
"Parrot Assembly": 2,
"Parrot Internal Representation": 2,
"Pascal": 2,
"Pawn": 2,
"Pep8": 2,
"Perl": 2,
"Pic": 3,
"Pickle": 1,
"PicoLisp": 2,
"PigLatin": 2,
"Pike": 2,
"Pip Requirements": 1,
"Pkl": 2,
"PlantUML": 1,
"Pod": 4,
"Pod 6": 4,
"PogoScript": 2,
"Polar": 2,
"Pony": 2,
"Portugol": 2,
"PostCSS": 3,
"PostScript": 3,
"PowerBuilder": 2,
"PowerShell": 2,
"Praat": 2,
"Prisma": 1,
"Processing": 2,
"Procfile": 2,
"Proguard": 1,
"Prolog": 2,
"Promela": 2,
"Propeller Spin": 2,
"Protocol Buffer": 1,
"Protocol Buffer Text Format": 1,
"Public Key": 1,
"Pug": 3,
"Puppet": 2,
"Pure Data": 1,
"PureBasic": 2,
"PureScript": 2,
"Pyret": 2,
"Python": 2,
"Python console": 2,
"Python traceback": 1,
"Q#": 2,
"QML": 2,
"QMake": 2,
"Qt Script": 2,
"Quake": 2,
"R": 2,
"RAML": 3,
"RBS": 1,
"RDoc": 4,
"REALbasic": 2,
"REXX": 2,
"RMarkdown": 4,
"RON": 1,
"RPC": 2,
"RPGLE": 2,
"RPM Spec": 1,
"RUNOFF": 3,
"Racket": 2,
"Ragel": 2,
"Raku": 2,
"Rascal": 2,
"Raw token data": 1,
"ReScript": 2,
"Readline Config": 1,
"Reason": 2,
"ReasonLIGO": 2,
"Rebol": 2,
"Record Jar": 1,
"Red": 2,
"Redcode": 2,
"Redirect Rules": 1,
"Regular Expression": 1,
"Ren'Py": 2,
"RenderScript": 2,
"Rez": 2,
"Rich Text Format": 3,
"Ring": 2,
"Riot": 3,
"RobotFramework": 2,
"Roc": 2,
"Roff": 3,
"Roff Manpage": 3,
"Rouge": 2,
"RouterOS Script": 2,
"Ruby": 2,
"Rust": 2,
"SAS": 2,
"SCSS": 3,
"SELinux Policy": 1,
"SMT": 2,
"SPARQL": 1,
"SQF": 2,
"SQL": 1,
"SQLPL": 2,
"SRecode Template": 3,
"SSH Config": 1,
"STAR": 1,
"STL": 1,
"STON": 1,
"SVG": 1,
"SWIG": 2,
"Sage": 2,
"SaltStack": 2,
"Sass": 3,
"Scala": 2,
"Scaml": 3,
"Scenic": 2,
"Scheme": 2,
"Scilab": 2,
"Self": 2,
"ShaderLab": 2,
"Shell": 2,
"ShellCheck Config": 1,
"ShellSession": 2,
"Shen": 2,
"Sieve": 2,
"Simple File Verification": 1,
"Singularity": 2,
"Slash": 2,
"Slice": 2,
"Slim": 3,
"Slint": 3,
"SmPL": 2,
"Smali": 2,
"Smalltalk": 2,
"Smarty": 2,
"Smithy": 2,
"Snakemake": 2,
"Solidity": 2,
"Soong": 1,
"SourcePawn": 2,
"Spline Font Database": 1,
"Squirrel": 2,
"Stan": 2,
"Standard ML": 2,
"Starlark": 2,
"Stata": 2,
"StringTemplate": 3,
"Stylus": 3,
"SubRip Text": 1,
"SugarSS": 3,
"SuperCollider": 2,
"Svelte": 3,
"Sway": 2,
"Sweave": 4,
"Swift": 2,
"SystemVerilog": 2,
"TI Program": 2,
"TL-Verilog": 2,
"TLA": 2,
"TOML": 1,
"TSQL": 2,
"TSV": 1,
"TSX": 2,
"TXL": 2,
"Talon": 2,
"Tcl": 2,
"Tcsh": 2,
"TeX": 3,
"Tea": 3,
"Terra": 2,
"Terraform Template": 3,
"Texinfo": 4,
"Text": 4,
"TextGrid": 1,
"TextMate Properties": 1,
"Textile": 4,
"Thrift": 2,
"Toit": 2,
"Turing": 2,
"Turtle": 1,
"Twig": 3,
"Type Language": 1,
"TypeScript": 2,
"Typst": 2,
"Unified Parallel C": 2,
"Unity3D Asset": 1,
"Unix Assembly": 2,
"Uno": 2,
"UnrealScript": 2,
"UrWeb": 2,
"V": 2,
"VBA": 2,
"VBScript": 2,
"VCL": 2,
"VHDL": 2,
"Vala": 2,
"Valve Data Format": 1,
"Velocity Template Language": 3,
"Verilog": 2,
"Vim Help File": 4,
"Vim Script": 2,
"Vim Snippet": 3,
"Visual Basic .NET": 2,
"Visual Basic 6.0": 2,
"Volt": 2,
"Vue": 3,
"Vyper": 2,
"WDL": 2,
"WGSL": 2,
"Wavefront Material": 1,
"Wavefront Object": 1,
"Web Ontology Language": 1,
"WebAssembly": 2,
"WebAssembly Interface Type": 1,
"WebIDL": 2,
"WebVTT": 1,
"Wget Config": 1,
"Whiley": 2,
"Wikitext": 4,
"Win32 Message File": 1,
"Windows Registry Entries": 1,
"Witcher Script": 2,
"Wollok": 2,
"World of Warcraft Addon Data": 1,
"Wren": 2,
"X BitMap": 1,
"X Font Directory Index": 1,
"X PixMap": 1,
"X10": 2,
"XC": 2,
"XCompose": 1,
"XML": 1,
"XML Property List": 1,
"XPages": 1,
"XProc": 2,
"XQuery": 2,
"XS": 2,
"XSLT": 2,
"Xojo": 2,
"Xonsh": 2,
"Xtend": 2,
"YAML": 1,
"YANG": 1,
"YARA": 2,
"YASnippet": 3,
"Yacc": 2,
"Yul": 2,
"ZAP": 2,
"ZIL": 2,
"Zeek": 2,
"ZenScript": 2,
"Zephir": 2,
"Zig": 2,
"Zimpl": 2,
"cURL Config": 1,
"crontab": 1,
"desktop": 1,
"dircolors": 1,
"eC": 2,
"edn": 1,
"fish": 2,
"hoon": 2,
"jq": 2,
"kvlang": 3,
"mIRC Script": 2,
"mcfunction": 2,
"mupad": 2,
"nanorc": 1,
"nesC": 2,
"ooc": 2,
"q": 2,
"reStructuredText": 4,
"robots.txt": 1,
"sed": 2,
"templ": 3,
"wisp": 2,
"xBase": 2,
}

179
go-enry/data/vendor.go Normal file
View File

@ -0,0 +1,179 @@
// Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT.
// Extracted from github/linguist commit: 42fd3c2514375fc6ad281552368edd3fb9f6ee7f
package data
import "github.com/go-enry/go-enry/v2/regex"
var VendorMatchers = []regex.EnryRegexp{
regex.MustCompile(`(^|/)cache/`),
regex.MustCompile(`^[Dd]ependencies/`),
regex.MustCompile(`(^|/)dist/`),
regex.MustCompile(`^deps/`),
regex.MustCompile(`(^|/)configure$`),
regex.MustCompile(`(^|/)config\.guess$`),
regex.MustCompile(`(^|/)config\.sub$`),
regex.MustCompile(`(^|/)aclocal\.m4`),
regex.MustCompile(`(^|/)libtool\.m4`),
regex.MustCompile(`(^|/)ltoptions\.m4`),
regex.MustCompile(`(^|/)ltsugar\.m4`),
regex.MustCompile(`(^|/)ltversion\.m4`),
regex.MustCompile(`(^|/)lt~obsolete\.m4`),
regex.MustCompile(`(^|/)dotnet-install\.(ps1|sh)$`),
regex.MustCompile(`(^|/)cpplint\.py`),
regex.MustCompile(`(^|/)node_modules/`),
regex.MustCompile(`(^|/)\.yarn/releases/`),
regex.MustCompile(`(^|/)\.yarn/plugins/`),
regex.MustCompile(`(^|/)\.yarn/sdks/`),
regex.MustCompile(`(^|/)\.yarn/versions/`),
regex.MustCompile(`(^|/)\.yarn/unplugged/`),
regex.MustCompile(`(^|/)_esy$`),
regex.MustCompile(`(^|/)bower_components/`),
regex.MustCompile(`^rebar$`),
regex.MustCompile(`(^|/)erlang\.mk`),
regex.MustCompile(`(^|/)Godeps/_workspace/`),
regex.MustCompile(`(^|/)testdata/`),
regex.MustCompile(`(^|/)\.indent\.pro`),
regex.MustCompile(`(\.|-)min\.(js|css)$`),
regex.MustCompile(`([^\s]*)import\.(css|less|scss|styl)$`),
regex.MustCompile(`(^|/)bootstrap([^/.]*)(\..*)?\.(js|css|less|scss|styl)$`),
regex.MustCompile(`(^|/)custom\.bootstrap([^\s]*)(js|css|less|scss|styl)$`),
regex.MustCompile(`(^|/)font-?awesome\.(css|less|scss|styl)$`),
regex.MustCompile(`(^|/)font-?awesome/.*\.(css|less|scss|styl)$`),
regex.MustCompile(`(^|/)foundation\.(css|less|scss|styl)$`),
regex.MustCompile(`(^|/)normalize\.(css|less|scss|styl)$`),
regex.MustCompile(`(^|/)skeleton\.(css|less|scss|styl)$`),
regex.MustCompile(`(^|/)[Bb]ourbon/.*\.(css|less|scss|styl)$`),
regex.MustCompile(`(^|/)animate\.(css|less|scss|styl)$`),
regex.MustCompile(`(^|/)materialize\.(css|less|scss|styl|js)$`),
regex.MustCompile(`(^|/)select2/.*\.(css|scss|js)$`),
regex.MustCompile(`(^|/)bulma\.(css|sass|scss)$`),
regex.MustCompile(`(3rd|[Tt]hird)[-_]?[Pp]arty/`),
regex.MustCompile(`(^|/)vendors?/`),
regex.MustCompile(`(^|/)[Ee]xtern(als?)?/`),
regex.MustCompile(`(^|/)[Vv]+endor/`),
regex.MustCompile(`^debian/`),
regex.MustCompile(`(^|/)run\.n$`),
regex.MustCompile(`(^|/)bootstrap-datepicker/`),
regex.MustCompile(`(^|/)jquery([^.]*)\.js$`),
regex.MustCompile(`(^|/)jquery\-\d\.\d+(\.\d+)?\.js$`),
regex.MustCompile(`(^|/)jquery\-ui(\-\d\.\d+(\.\d+)?)?(\.\w+)?\.(js|css)$`),
regex.MustCompile(`(^|/)jquery\.(ui|effects)\.([^.]*)\.(js|css)$`),
regex.MustCompile(`(^|/)jquery\.fn\.gantt\.js`),
regex.MustCompile(`(^|/)jquery\.fancybox\.(js|css)`),
regex.MustCompile(`(^|/)fuelux\.js`),
regex.MustCompile(`(^|/)jquery\.fileupload(-\w+)?\.js$`),
regex.MustCompile(`(^|/)jquery\.dataTables\.js`),
regex.MustCompile(`(^|/)bootbox\.js`),
regex.MustCompile(`(^|/)pdf\.worker\.js`),
regex.MustCompile(`(^|/)slick\.\w+.js$`),
regex.MustCompile(`(^|/)Leaflet\.Coordinates-\d+\.\d+\.\d+\.src\.js$`),
regex.MustCompile(`(^|/)leaflet\.draw-src\.js`),
regex.MustCompile(`(^|/)leaflet\.draw\.css`),
regex.MustCompile(`(^|/)Control\.FullScreen\.css`),
regex.MustCompile(`(^|/)Control\.FullScreen\.js`),
regex.MustCompile(`(^|/)leaflet\.spin\.js`),
regex.MustCompile(`(^|/)wicket-leaflet\.js`),
regex.MustCompile(`(^|/)\.sublime-project`),
regex.MustCompile(`(^|/)\.sublime-workspace`),
regex.MustCompile(`(^|/)\.vscode/`),
regex.MustCompile(`(^|/)prototype(.*)\.js$`),
regex.MustCompile(`(^|/)effects\.js$`),
regex.MustCompile(`(^|/)controls\.js$`),
regex.MustCompile(`(^|/)dragdrop\.js$`),
regex.MustCompile(`(.*?)\.d\.ts$`),
regex.MustCompile(`(^|/)mootools([^.]*)\d+\.\d+.\d+([^.]*)\.js$`),
regex.MustCompile(`(^|/)dojo\.js$`),
regex.MustCompile(`(^|/)MochiKit\.js$`),
regex.MustCompile(`(^|/)yahoo-([^.]*)\.js$`),
regex.MustCompile(`(^|/)yui([^.]*)\.js$`),
regex.MustCompile(`(^|/)ckeditor\.js$`),
regex.MustCompile(`(^|/)tiny_mce([^.]*)\.js$`),
regex.MustCompile(`(^|/)tiny_mce/(langs|plugins|themes|utils)`),
regex.MustCompile(`(^|/)ace-builds/`),
regex.MustCompile(`(^|/)fontello(.*?)\.css$`),
regex.MustCompile(`(^|/)MathJax/`),
regex.MustCompile(`(^|/)Chart\.js$`),
regex.MustCompile(`(^|/)[Cc]ode[Mm]irror/(\d+\.\d+/)?(lib|mode|theme|addon|keymap|demo)`),
regex.MustCompile(`(^|/)shBrush([^.]*)\.js$`),
regex.MustCompile(`(^|/)shCore\.js$`),
regex.MustCompile(`(^|/)shLegacy\.js$`),
regex.MustCompile(`(^|/)angular([^.]*)\.js$`),
regex.MustCompile(`(^|\/)d3(\.v\d+)?([^.]*)\.js$`),
regex.MustCompile(`(^|/)react(-[^.]*)?\.js$`),
regex.MustCompile(`(^|/)flow-typed/.*\.js$`),
regex.MustCompile(`(^|/)modernizr\-\d\.\d+(\.\d+)?\.js$`),
regex.MustCompile(`(^|/)modernizr\.custom\.\d+\.js$`),
regex.MustCompile(`(^|/)knockout-(\d+\.){3}(debug\.)?js$`),
regex.MustCompile(`(^|/)docs?/_?(build|themes?|templates?|static)/`),
regex.MustCompile(`(^|/)admin_media/`),
regex.MustCompile(`(^|/)env/`),
regex.MustCompile(`(^|/)fabfile\.py$`),
regex.MustCompile(`(^|/)waf$`),
regex.MustCompile(`(^|/)\.osx$`),
regex.MustCompile(`\.xctemplate/`),
regex.MustCompile(`\.imageset/`),
regex.MustCompile(`(^|/)Carthage/`),
regex.MustCompile(`(^|/)Sparkle/`),
regex.MustCompile(`(^|/)Crashlytics\.framework/`),
regex.MustCompile(`(^|/)Fabric\.framework/`),
regex.MustCompile(`(^|/)BuddyBuildSDK\.framework/`),
regex.MustCompile(`(^|/)Realm\.framework`),
regex.MustCompile(`(^|/)RealmSwift\.framework`),
regex.MustCompile(`(^|/)\.gitattributes$`),
regex.MustCompile(`(^|/)\.gitignore$`),
regex.MustCompile(`(^|/)\.gitmodules$`),
regex.MustCompile(`(^|/)gradlew$`),
regex.MustCompile(`(^|/)gradlew\.bat$`),
regex.MustCompile(`(^|/)gradle/wrapper/`),
regex.MustCompile(`(^|/)mvnw$`),
regex.MustCompile(`(^|/)mvnw\.cmd$`),
regex.MustCompile(`(^|/)\.mvn/wrapper/`),
regex.MustCompile(`-vsdoc\.js$`),
regex.MustCompile(`\.intellisense\.js$`),
regex.MustCompile(`(^|/)jquery([^.]*)\.validate(\.unobtrusive)?\.js$`),
regex.MustCompile(`(^|/)jquery([^.]*)\.unobtrusive\-ajax\.js$`),
regex.MustCompile(`(^|/)[Mm]icrosoft([Mm]vc)?([Aa]jax|[Vv]alidation)(\.debug)?\.js$`),
regex.MustCompile(`(^|/)[Pp]ackages\/.+\.\d+\/`),
regex.MustCompile(`(^|/)extjs/.*?\.js$`),
regex.MustCompile(`(^|/)extjs/.*?\.xml$`),
regex.MustCompile(`(^|/)extjs/.*?\.txt$`),
regex.MustCompile(`(^|/)extjs/.*?\.html$`),
regex.MustCompile(`(^|/)extjs/.*?\.properties$`),
regex.MustCompile(`(^|/)extjs/\.sencha/`),
regex.MustCompile(`(^|/)extjs/docs/`),
regex.MustCompile(`(^|/)extjs/builds/`),
regex.MustCompile(`(^|/)extjs/cmd/`),
regex.MustCompile(`(^|/)extjs/examples/`),
regex.MustCompile(`(^|/)extjs/locale/`),
regex.MustCompile(`(^|/)extjs/packages/`),
regex.MustCompile(`(^|/)extjs/plugins/`),
regex.MustCompile(`(^|/)extjs/resources/`),
regex.MustCompile(`(^|/)extjs/src/`),
regex.MustCompile(`(^|/)extjs/welcome/`),
regex.MustCompile(`(^|/)html5shiv\.js$`),
regex.MustCompile(`(^|/)[Tt]ests?/fixtures/`),
regex.MustCompile(`(^|/)[Ss]pecs?/fixtures/`),
regex.MustCompile(`(^|/)cordova([^.]*)\.js$`),
regex.MustCompile(`(^|/)cordova\-\d\.\d(\.\d)?\.js$`),
regex.MustCompile(`(^|/)foundation(\..*)?\.js$`),
regex.MustCompile(`(^|/)Vagrantfile$`),
regex.MustCompile(`(^|/)\.[Dd][Ss]_[Ss]tore$`),
regex.MustCompile(`(^|/)inst/extdata/`),
regex.MustCompile(`(^|/)octicons\.css`),
regex.MustCompile(`(^|/)sprockets-octicons\.scss`),
regex.MustCompile(`(^|/)activator$`),
regex.MustCompile(`(^|/)activator\.bat$`),
regex.MustCompile(`(^|/)proguard\.pro$`),
regex.MustCompile(`(^|/)proguard-rules\.pro$`),
regex.MustCompile(`(^|/)puphpet/`),
regex.MustCompile(`(^|/)\.google_apis/`),
regex.MustCompile(`(^|/)Jenkinsfile$`),
regex.MustCompile(`(^|/)\.gitpod\.Dockerfile$`),
regex.MustCompile(`(^|/)\.github/`),
regex.MustCompile(`(^|/)\.obsidian/`),
regex.MustCompile(`(^|/)\.teamcity/`),
}
// FastVendorMatcher is equivalent to matching any of the VendorMatchers.
var FastVendorMatcher = regex.MustCompile(`(?:^(?:(?:[Dd]ependencies/)|(?:debian/)|(?:deps/)|(?:rebar$)))|(?:(?:^|/)(?:(?:BuddyBuildSDK\.framework/)|(?:Carthage/)|(?:Chart\.js$)|(?:Control\.FullScreen\.css)|(?:Control\.FullScreen\.js)|(?:Crashlytics\.framework/)|(?:Fabric\.framework/)|(?:Godeps/_workspace/)|(?:Jenkinsfile$)|(?:Leaflet\.Coordinates-\d+\.\d+\.\d+\.src\.js$)|(?:MathJax/)|(?:MochiKit\.js$)|(?:RealmSwift\.framework)|(?:Realm\.framework)|(?:Sparkle/)|(?:Vagrantfile$)|(?:[Bb]ourbon/.*\.(css|less|scss|styl)$)|(?:[Cc]ode[Mm]irror/(\d+\.\d+/)?(lib|mode|theme|addon|keymap|demo))|(?:[Ee]xtern(als?)?/)|(?:[Mm]icrosoft([Mm]vc)?([Aa]jax|[Vv]alidation)(\.debug)?\.js$)|(?:[Pp]ackages\/.+\.\d+\/)|(?:[Ss]pecs?/fixtures/)|(?:[Tt]ests?/fixtures/)|(?:[Vv]+endor/)|(?:\.[Dd][Ss]_[Ss]tore$)|(?:\.gitattributes$)|(?:\.github/)|(?:\.gitignore$)|(?:\.gitmodules$)|(?:\.gitpod\.Dockerfile$)|(?:\.google_apis/)|(?:\.indent\.pro)|(?:\.mvn/wrapper/)|(?:\.obsidian/)|(?:\.osx$)|(?:\.sublime-project)|(?:\.sublime-workspace)|(?:\.teamcity/)|(?:\.vscode/)|(?:\.yarn/plugins/)|(?:\.yarn/releases/)|(?:\.yarn/sdks/)|(?:\.yarn/unplugged/)|(?:\.yarn/versions/)|(?:_esy$)|(?:ace-builds/)|(?:aclocal\.m4)|(?:activator$)|(?:activator\.bat$)|(?:admin_media/)|(?:angular([^.]*)\.js$)|(?:animate\.(css|less|scss|styl)$)|(?:bootbox\.js)|(?:bootstrap([^/.]*)(\..*)?\.(js|css|less|scss|styl)$)|(?:bootstrap-datepicker/)|(?:bower_components/)|(?:bulma\.(css|sass|scss)$)|(?:cache/)|(?:ckeditor\.js$)|(?:config\.guess$)|(?:config\.sub$)|(?:configure$)|(?:controls\.js$)|(?:cordova([^.]*)\.js$)|(?:cordova\-\d\.\d(\.\d)?\.js$)|(?:cpplint\.py)|(?:custom\.bootstrap([^\s]*)(js|css|less|scss|styl)$)|(?:dist/)|(?:docs?/_?(build|themes?|templates?|static)/)|(?:dojo\.js$)|(?:dotnet-install\.(ps1|sh)$)|(?:dragdrop\.js$)|(?:effects\.js$)|(?:env/)|(?:erlang\.mk)|(?:extjs/.*?\.html$)|(?:extjs/.*?\.js$)|(?:extjs/.*?\.properties$)|(?:extjs/.*?\.txt$)|(?:extjs/.*?\.xml$)|(?:extjs/\.sencha/)|(?:extjs/builds/)|(?:extjs/cmd/)|(?:extjs/docs/)|(?:extjs/examples/)|(?:extjs/locale/)|(?:extjs/packages/)|(?:extjs/plugins/)|(?:extjs/resources/)|(?:extjs/src/)|(?:extjs/welcome/)|(?:fabfile\.py$)|(?:flow-typed/.*\.js$)|(?:font-?awesome/.*\.(css|less|scss|styl)$)|(?:font-?awesome\.(css|less|scss|styl)$)|(?:fontello(.*?)\.css$)|(?:foundation(\..*)?\.js$)|(?:foundation\.(css|less|scss|styl)$)|(?:fuelux\.js)|(?:gradle/wrapper/)|(?:gradlew$)|(?:gradlew\.bat$)|(?:html5shiv\.js$)|(?:inst/extdata/)|(?:jquery([^.]*)\.js$)|(?:jquery([^.]*)\.unobtrusive\-ajax\.js$)|(?:jquery([^.]*)\.validate(\.unobtrusive)?\.js$)|(?:jquery\-\d\.\d+(\.\d+)?\.js$)|(?:jquery\-ui(\-\d\.\d+(\.\d+)?)?(\.\w+)?\.(js|css)$)|(?:jquery\.(ui|effects)\.([^.]*)\.(js|css)$)|(?:jquery\.dataTables\.js)|(?:jquery\.fancybox\.(js|css))|(?:jquery\.fileupload(-\w+)?\.js$)|(?:jquery\.fn\.gantt\.js)|(?:knockout-(\d+\.){3}(debug\.)?js$)|(?:leaflet\.draw-src\.js)|(?:leaflet\.draw\.css)|(?:leaflet\.spin\.js)|(?:libtool\.m4)|(?:ltoptions\.m4)|(?:ltsugar\.m4)|(?:ltversion\.m4)|(?:lt~obsolete\.m4)|(?:materialize\.(css|less|scss|styl|js)$)|(?:modernizr\-\d\.\d+(\.\d+)?\.js$)|(?:modernizr\.custom\.\d+\.js$)|(?:mootools([^.]*)\d+\.\d+.\d+([^.]*)\.js$)|(?:mvnw$)|(?:mvnw\.cmd$)|(?:node_modules/)|(?:normalize\.(css|less|scss|styl)$)|(?:octicons\.css)|(?:pdf\.worker\.js)|(?:proguard-rules\.pro$)|(?:proguard\.pro$)|(?:prototype(.*)\.js$)|(?:puphpet/)|(?:react(-[^.]*)?\.js$)|(?:run\.n$)|(?:select2/.*\.(css|scss|js)$)|(?:shBrush([^.]*)\.js$)|(?:shCore\.js$)|(?:shLegacy\.js$)|(?:skeleton\.(css|less|scss|styl)$)|(?:slick\.\w+.js$)|(?:sprockets-octicons\.scss)|(?:testdata/)|(?:tiny_mce([^.]*)\.js$)|(?:tiny_mce/(langs|plugins|themes|utils))|(?:vendors?/)|(?:waf$)|(?:wicket-leaflet\.js)|(?:yahoo-([^.]*)\.js$)|(?:yui([^.]*)\.js$)))|(?:(.*?)\.d\.ts$)|(?:(3rd|[Tt]hird)[-_]?[Pp]arty/)|(?:([^\s]*)import\.(css|less|scss|styl)$)|(?:(\.|-)min\.(js|css)$)|(?:(^|\/)d3(\.v\d+)?([^.]*)\.js$)|(?:-vsdoc\.js$)|(?:\.imageset/)|(?:\.intellisense\.js$)|(?:\.xctemplate/)`)