mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-06-19 06:33:06 -03:00
committed by
Lauris BH
parent
21b48ffc4a
commit
4e3e15e80d
@ -1,5 +1,5 @@
|
||||
// Code generated by github.com/src-d/enry/v2/internal/code-generator DO NOT EDIT.
|
||||
// Extracted from github/linguist commit: e4560984058b4726010ca4b8f03ed9d0f8f464db
|
||||
// Extracted from github/linguist commit: 3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d
|
||||
|
||||
package data
|
||||
|
||||
@ -644,6 +644,10 @@ var ContentHeuristics = map[string]*Heuristics{
|
||||
rule.MatchingLanguages("TeX"),
|
||||
regexp.MustCompile(`(?m)\\\w+{`),
|
||||
),
|
||||
rule.Or(
|
||||
rule.MatchingLanguages("ObjectScript"),
|
||||
regexp.MustCompile(`(?m)^Class\s`),
|
||||
),
|
||||
},
|
||||
".cs": &Heuristics{
|
||||
rule.Or(
|
||||
@ -666,7 +670,7 @@ var ContentHeuristics = map[string]*Heuristics{
|
||||
),
|
||||
rule.Or(
|
||||
rule.MatchingLanguages("Makefile"),
|
||||
regexp.MustCompile(`(?m)([\/\\].*:\s+.*\s\\$|: \\$|^ : |^[\w\s\/\\.]+\w+\.\w+\s*:\s+[\w\s\/\\.]+\w+\.\w+)`),
|
||||
regexp.MustCompile(`(?m)([\/\\].*:\s+.*\s\\$|: \\$|^[ %]:|^[\w\s\/\\.]+\w+\.\w+\s*:\s+[\w\s\/\\.]+\w+\.\w+)`),
|
||||
),
|
||||
},
|
||||
".ecl": &Heuristics{
|
||||
@ -759,6 +763,10 @@ var ContentHeuristics = map[string]*Heuristics{
|
||||
rule.MatchingLanguages("Graph Modeling Language"),
|
||||
regexp.MustCompile(`(?m)(?i:^\s*(graph|node)\s+\[$)`),
|
||||
),
|
||||
rule.Or(
|
||||
rule.MatchingLanguages("Gerber Image"),
|
||||
regexp.MustCompile(`(?m)\*\%$`),
|
||||
),
|
||||
rule.Always(
|
||||
rule.MatchingLanguages("Game Maker Language"),
|
||||
),
|
||||
@ -776,7 +784,7 @@ var ContentHeuristics = map[string]*Heuristics{
|
||||
),
|
||||
rule.Or(
|
||||
rule.MatchingLanguages("C++"),
|
||||
regexp.MustCompile(`(?m)^\s*#\s*include <(cstdint|string|vector|map|list|array|bitset|queue|stack|forward_list|unordered_map|unordered_set|(i|o|io)stream)>|^\s*template\s*<|^[ \t]*try|^[ \t]*catch\s*\(|^[ \t]*(class|(using[ \t]+)?namespace)\s+\w+|^[ \t]*(private|public|protected):$|std::\w+`),
|
||||
regexp.MustCompile(`(?m)^\s*#\s*include <(cstdint|string|vector|map|list|array|bitset|queue|stack|forward_list|unordered_map|unordered_set|(i|o|io)stream)>|^\s*template\s*<|^[ \t]*(try|constexpr)|^[ \t]*catch\s*\(|^[ \t]*(class|(using[ \t]+)?namespace)\s+\w+|^[ \t]*(private|public|protected):$|std::\w+`),
|
||||
),
|
||||
},
|
||||
".hh": &Heuristics{
|
||||
@ -799,6 +807,10 @@ var ContentHeuristics = map[string]*Heuristics{
|
||||
rule.MatchingLanguages("PHP"),
|
||||
regexp.MustCompile(`(?m)^<\?(?:php)?`),
|
||||
),
|
||||
rule.Or(
|
||||
rule.MatchingLanguages("SourcePawn"),
|
||||
regexp.MustCompile(`(?m)^public\s+(?:SharedPlugin(?:\s+|:)__pl_\w+\s*=(?:\s*{)?|(?:void\s+)?__pl_\w+_SetNTVOptional\(\)(?:\s*{)?)`),
|
||||
),
|
||||
rule.Or(
|
||||
rule.MatchingLanguages("POV-Ray SDL"),
|
||||
regexp.MustCompile(`(?m)^\s*#(declare|local|macro|while)\s`),
|
||||
@ -868,9 +880,16 @@ var ContentHeuristics = map[string]*Heuristics{
|
||||
rule.MatchingLanguages("M"),
|
||||
regexp.MustCompile(`(?m)^\s*;`),
|
||||
),
|
||||
rule.Or(
|
||||
rule.And(
|
||||
rule.MatchingLanguages("Mathematica"),
|
||||
regexp.MustCompile(`(?m)\*\)$`),
|
||||
rule.Or(
|
||||
rule.MatchingLanguages(""),
|
||||
regexp.MustCompile(`(?m)\(\*`),
|
||||
),
|
||||
rule.Or(
|
||||
rule.MatchingLanguages(""),
|
||||
regexp.MustCompile(`(?m)\*\)$`),
|
||||
),
|
||||
),
|
||||
rule.Or(
|
||||
rule.MatchingLanguages("MATLAB"),
|
||||
@ -1062,7 +1081,7 @@ var ContentHeuristics = map[string]*Heuristics{
|
||||
regexp.MustCompile(`(?m)^\s*(?:use\s+v6\b|\bmodule\b|\b(?:my\s+)?class\b)`),
|
||||
),
|
||||
rule.Or(
|
||||
rule.MatchingLanguages("XPM"),
|
||||
rule.MatchingLanguages("X PixMap"),
|
||||
regexp.MustCompile(`(?m)^\s*\/\* XPM \*\/`),
|
||||
),
|
||||
},
|
||||
@ -1145,7 +1164,7 @@ var ContentHeuristics = map[string]*Heuristics{
|
||||
".props": &Heuristics{
|
||||
rule.Or(
|
||||
rule.MatchingLanguages("XML"),
|
||||
regexp.MustCompile(`(?m)^(\s*)(?i:<Project|<Import|<Property|<?xml|xmlns)`),
|
||||
regexp.MustCompile(`(?m)^(\s*)(?i:<Project|<Import|<Property|<\?xml|xmlns)`),
|
||||
),
|
||||
rule.Or(
|
||||
rule.MatchingLanguages("INI"),
|
||||
@ -1173,10 +1192,6 @@ var ContentHeuristics = map[string]*Heuristics{
|
||||
),
|
||||
},
|
||||
".rno": &Heuristics{
|
||||
rule.Or(
|
||||
rule.MatchingLanguages("RUNOFF"),
|
||||
regexp.MustCompile(`(?m)(?i:^\.!|^\.end lit(?:eral)?\b)`),
|
||||
),
|
||||
rule.Or(
|
||||
rule.MatchingLanguages("Roff"),
|
||||
regexp.MustCompile(`(?m)^\.\\" `),
|
||||
@ -1214,7 +1229,7 @@ var ContentHeuristics = map[string]*Heuristics{
|
||||
".sql": &Heuristics{
|
||||
rule.Or(
|
||||
rule.MatchingLanguages("PLpgSQL"),
|
||||
regexp.MustCompile(`(?m)(?i:^\\i\b|AS \$\$|LANGUAGE '?plpgsql'?|SECURITY (DEFINER|INVOKER)|BEGIN( WORK| TRANSACTION)?;)`),
|
||||
regexp.MustCompile(`(?m)(?i:^\\i\b|AS \$\$|LANGUAGE '?plpgsql'?|SECURITY (DEFINER|INVOKER)|BEGIN( WORK )?;)`),
|
||||
),
|
||||
rule.Or(
|
||||
rule.MatchingLanguages("SQLPL"),
|
||||
@ -1224,6 +1239,17 @@ var ContentHeuristics = map[string]*Heuristics{
|
||||
rule.MatchingLanguages("PLSQL"),
|
||||
regexp.MustCompile(`(?m)(?i:\$\$PLSQL_|XMLTYPE|sysdate|systimestamp|\.nextval|connect by|AUTHID (DEFINER|CURRENT_USER)|constructor\W+function)`),
|
||||
),
|
||||
rule.And(
|
||||
rule.MatchingLanguages("TSQL"),
|
||||
rule.Not(
|
||||
rule.MatchingLanguages(""),
|
||||
regexp.MustCompile(`(?m)(?i:IDENTIFIED|NUMBER|VARCHAR2|REPEAT|UNTIL|IMMEDIATE)`),
|
||||
),
|
||||
rule.Or(
|
||||
rule.MatchingLanguages(""),
|
||||
regexp.MustCompile(`(?m)(?i:(GO)|(@@)|(CREATE PROCEDURE)|BEGIN( TRY| CATCH)|OUTPUT( INSERTED)|IF|ELSE|IIF|CHOOSE|CURSOR|FETCH|DEALLOCATE|DECLARE)`),
|
||||
),
|
||||
),
|
||||
rule.Not(
|
||||
rule.MatchingLanguages("SQL"),
|
||||
regexp.MustCompile(`(?m)(?i:begin|boolean|package|exception)`),
|
||||
@ -1279,7 +1305,7 @@ var ContentHeuristics = map[string]*Heuristics{
|
||||
},
|
||||
".tsx": &Heuristics{
|
||||
rule.Or(
|
||||
rule.MatchingLanguages("TypeScript"),
|
||||
rule.MatchingLanguages("TSX"),
|
||||
regexp.MustCompile(`(?m)^\s*(import.+(from\s+|require\()['"]react|\/\/\/\s*<reference\s)`),
|
||||
),
|
||||
rule.Or(
|
||||
@ -1287,6 +1313,15 @@ var ContentHeuristics = map[string]*Heuristics{
|
||||
regexp.MustCompile(`(?m)(?i:^\s*<\?xml\s+version)`),
|
||||
),
|
||||
},
|
||||
".vba": &Heuristics{
|
||||
rule.Or(
|
||||
rule.MatchingLanguages("Vim script"),
|
||||
regexp.MustCompile(`(?m)^UseVimball`),
|
||||
),
|
||||
rule.Always(
|
||||
rule.MatchingLanguages("Visual Basic"),
|
||||
),
|
||||
},
|
||||
".w": &Heuristics{
|
||||
rule.Or(
|
||||
rule.MatchingLanguages("OpenEdge ABL"),
|
||||
@ -1307,7 +1342,7 @@ var ContentHeuristics = map[string]*Heuristics{
|
||||
regexp.MustCompile(`(?m)^%(end|ctor|hook|group)\b`),
|
||||
),
|
||||
rule.Or(
|
||||
rule.MatchingLanguages("Linked Script"),
|
||||
rule.MatchingLanguages("Linker Script"),
|
||||
regexp.MustCompile(`(?m)OUTPUT_ARCH\(|OUTPUT_FORMAT\(|SECTIONS`),
|
||||
),
|
||||
},
|
||||
|
Reference in New Issue
Block a user