[Vendor] Update Batch 2020-11 (#13746)
* github.com/alecthomas/chroma v0.8.1 -> v0.8.2 Changelog: https://github.com/alecthomas/chroma/releases/tag/v0.8.2 * github.com/blevesearch/bleve v1.0.12 -> v1.0.13 Changelog: https://github.com/blevesearch/bleve/releases/tag/v1.0.13 * github.com/editorconfig/editorconfig-core-go v2.3.8 -> v2.3.9 Changelog: https://github.com/editorconfig/editorconfig-core-go/releases/tag/v2.3.9 * github.com/klauspost/compress v1.11.2 -> v1.11.3 Changelog: https://github.com/klauspost/compress/releases/tag/v1.11.3 * github.com/minio/minio-go v7.0.5 -> v7.0.6 Changelog: https://github.com/minio/minio-go/releases/tag/v7.0.6 Co-authored-by: Lauris BH <lauris@nix.lv>tokarchuk/v1.17
parent
e8a6c425ec
commit
c4deb97ed1
@ -1,12 +0,0 @@ |
|||||||
sudo: false |
|
||||||
language: go |
|
||||||
go: |
|
||||||
- "1.13.x" |
|
||||||
script: |
|
||||||
- go test -v ./... |
|
||||||
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s v1.26.0 |
|
||||||
- ./bin/golangci-lint run |
|
||||||
- git clean -fdx . |
|
||||||
after_success: |
|
||||||
curl -sL https://git.io/goreleaser | bash && goreleaser |
|
||||||
|
|
@ -0,0 +1,55 @@ |
|||||||
|
package p |
||||||
|
|
||||||
|
import ( |
||||||
|
. "github.com/alecthomas/chroma" // nolint
|
||||||
|
"github.com/alecthomas/chroma/lexers/internal" |
||||||
|
) |
||||||
|
|
||||||
|
// Promql lexer.
|
||||||
|
var Promql = internal.Register(MustNewLexer( |
||||||
|
&Config{ |
||||||
|
Name: "PromQL", |
||||||
|
Aliases: []string{"promql"}, |
||||||
|
Filenames: []string{"*.promql"}, |
||||||
|
MimeTypes: []string{}, |
||||||
|
}, |
||||||
|
Rules{ |
||||||
|
"root": { |
||||||
|
{`\n`, TextWhitespace, nil}, |
||||||
|
{`\s+`, TextWhitespace, nil}, |
||||||
|
{`,`, Punctuation, nil}, |
||||||
|
{Words(``, `\b`, `bool`, `by`, `group_left`, `group_right`, `ignoring`, `offset`, `on`, `without`), Keyword, nil}, |
||||||
|
{Words(``, `\b`, `sum`, `min`, `max`, `avg`, `group`, `stddev`, `stdvar`, `count`, `count_values`, `bottomk`, `topk`, `quantile`), Keyword, nil}, |
||||||
|
{Words(``, `\b`, `abs`, `absent`, `absent_over_time`, `avg_over_time`, `ceil`, `changes`, `clamp_max`, `clamp_min`, `count_over_time`, `day_of_month`, `day_of_week`, `days_in_month`, `delta`, `deriv`, `exp`, `floor`, `histogram_quantile`, `holt_winters`, `hour`, `idelta`, `increase`, `irate`, `label_join`, `label_replace`, `ln`, `log10`, `log2`, `max_over_time`, `min_over_time`, `minute`, `month`, `predict_linear`, `quantile_over_time`, `rate`, `resets`, `round`, `scalar`, `sort`, `sort_desc`, `sqrt`, `stddev_over_time`, `stdvar_over_time`, `sum_over_time`, `time`, `timestamp`, `vector`, `year`), KeywordReserved, nil}, |
||||||
|
{`[1-9][0-9]*[smhdwy]`, LiteralString, nil}, |
||||||
|
{`-?[0-9]+\.[0-9]+`, LiteralNumberFloat, nil}, |
||||||
|
{`-?[0-9]+`, LiteralNumberInteger, nil}, |
||||||
|
{`#.*?$`, CommentSingle, nil}, |
||||||
|
{`(\+|\-|\*|\/|\%|\^)`, Operator, nil}, |
||||||
|
{`==|!=|>=|<=|<|>`, Operator, nil}, |
||||||
|
{`and|or|unless`, OperatorWord, nil}, |
||||||
|
{`[_a-zA-Z][a-zA-Z0-9_]+`, NameVariable, nil}, |
||||||
|
{`(["\'])(.*?)(["\'])`, ByGroups(Punctuation, LiteralString, Punctuation), nil}, |
||||||
|
{`\(`, Operator, Push("function")}, |
||||||
|
{`\)`, Operator, nil}, |
||||||
|
{`\{`, Punctuation, Push("labels")}, |
||||||
|
{`\[`, Punctuation, Push("range")}, |
||||||
|
}, |
||||||
|
"labels": { |
||||||
|
{`\}`, Punctuation, Pop(1)}, |
||||||
|
{`\n`, TextWhitespace, nil}, |
||||||
|
{`\s+`, TextWhitespace, nil}, |
||||||
|
{`,`, Punctuation, nil}, |
||||||
|
{`([_a-zA-Z][a-zA-Z0-9_]*?)(\s*?)(=~|!=|=|~!)(\s*?)(")(.*?)(")`, ByGroups(NameLabel, TextWhitespace, Operator, TextWhitespace, Punctuation, LiteralString, Punctuation), nil}, |
||||||
|
}, |
||||||
|
"range": { |
||||||
|
{`\]`, Punctuation, Pop(1)}, |
||||||
|
{`[1-9][0-9]*[smhdwy]`, LiteralString, nil}, |
||||||
|
}, |
||||||
|
"function": { |
||||||
|
{`\)`, Operator, Pop(1)}, |
||||||
|
{`\(`, Operator, Push()}, |
||||||
|
Default(Pop(1)), |
||||||
|
}, |
||||||
|
}, |
||||||
|
)) |
@ -0,0 +1,54 @@ |
|||||||
|
package lexers |
||||||
|
|
||||||
|
import ( |
||||||
|
. "github.com/alecthomas/chroma" // nolint
|
||||||
|
"github.com/alecthomas/chroma/lexers/internal" |
||||||
|
) |
||||||
|
|
||||||
|
// Qml lexer.
|
||||||
|
var Qml = internal.Register(MustNewLexer( |
||||||
|
&Config{ |
||||||
|
Name: "QML", |
||||||
|
Aliases: []string{"qml", "qbs"}, |
||||||
|
Filenames: []string{"*.qml", "*.qbs"}, |
||||||
|
MimeTypes: []string{"application/x-qml", "application/x-qt.qbs+qml"}, |
||||||
|
DotAll: true, |
||||||
|
}, |
||||||
|
Rules{ |
||||||
|
"commentsandwhitespace": { |
||||||
|
{`\s+`, Text, nil}, |
||||||
|
{`<!--`, Comment, nil}, |
||||||
|
{`//.*?\n`, CommentSingle, nil}, |
||||||
|
{`/\*.*?\*/`, CommentMultiline, nil}, |
||||||
|
}, |
||||||
|
"slashstartsregex": { |
||||||
|
Include("commentsandwhitespace"), |
||||||
|
{`/(\\.|[^[/\\\n]|\[(\\.|[^\]\\\n])*])+/([gim]+\b|\B)`, LiteralStringRegex, Pop(1)}, |
||||||
|
{`(?=/)`, Text, Push("#pop", "badregex")}, |
||||||
|
Default(Pop(1)), |
||||||
|
}, |
||||||
|
"badregex": { |
||||||
|
{`\n`, Text, Pop(1)}, |
||||||
|
}, |
||||||
|
"root": { |
||||||
|
{`^(?=\s|/|<!--)`, Text, Push("slashstartsregex")}, |
||||||
|
Include("commentsandwhitespace"), |
||||||
|
{`\+\+|--|~|&&|\?|:|\|\||\\(?=\n)|(<<|>>>?|==?|!=?|[-<>+*%&|^/])=?`, Operator, Push("slashstartsregex")}, |
||||||
|
{`[{(\[;,]`, Punctuation, Push("slashstartsregex")}, |
||||||
|
{`[})\].]`, Punctuation, nil}, |
||||||
|
{`\bid\s*:\s*[A-Za-z][\w.]*`, KeywordDeclaration, Push("slashstartsregex")}, |
||||||
|
{`\b[A-Za-z][\w.]*\s*:`, Keyword, Push("slashstartsregex")}, |
||||||
|
{`(for|in|while|do|break|return|continue|switch|case|default|if|else|throw|try|catch|finally|new|delete|typeof|instanceof|void|this)\b`, Keyword, Push("slashstartsregex")}, |
||||||
|
{`(var|let|with|function)\b`, KeywordDeclaration, Push("slashstartsregex")}, |
||||||
|
{`(abstract|boolean|byte|char|class|const|debugger|double|enum|export|extends|final|float|goto|implements|import|int|interface|long|native|package|private|protected|public|short|static|super|synchronized|throws|transient|volatile)\b`, KeywordReserved, nil}, |
||||||
|
{`(true|false|null|NaN|Infinity|undefined)\b`, KeywordConstant, nil}, |
||||||
|
{`(Array|Boolean|Date|Error|Function|Math|netscape|Number|Object|Packages|RegExp|String|sun|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|Error|eval|isFinite|isNaN|parseFloat|parseInt|document|this|window)\b`, NameBuiltin, nil}, |
||||||
|
{`[$a-zA-Z_]\w*`, NameOther, nil}, |
||||||
|
{`[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?`, LiteralNumberFloat, nil}, |
||||||
|
{`0x[0-9a-fA-F]+`, LiteralNumberHex, nil}, |
||||||
|
{`[0-9]+`, LiteralNumberInteger, nil}, |
||||||
|
{`"(\\\\|\\"|[^"])*"`, LiteralStringDouble, nil}, |
||||||
|
{`'(\\\\|\\'|[^'])*'`, LiteralStringSingle, nil}, |
||||||
|
}, |
||||||
|
}, |
||||||
|
)) |
File diff suppressed because one or more lines are too long
@ -0,0 +1,81 @@ |
|||||||
|
package styles |
||||||
|
|
||||||
|
import ( |
||||||
|
"github.com/alecthomas/chroma" |
||||||
|
) |
||||||
|
|
||||||
|
// Base16Snazzy style
|
||||||
|
var Base16Snazzy = Register(chroma.MustNewStyle("base16-snazzy", chroma.StyleEntries{ |
||||||
|
chroma.Comment: "#78787e", |
||||||
|
chroma.CommentHashbang: "#78787e", |
||||||
|
chroma.CommentMultiline: "#78787e", |
||||||
|
chroma.CommentPreproc: "#78787e", |
||||||
|
chroma.CommentSingle: "#78787e", |
||||||
|
chroma.CommentSpecial: "#78787e", |
||||||
|
chroma.Generic: "#e2e4e5", |
||||||
|
chroma.GenericDeleted: "#ff5c57", |
||||||
|
chroma.GenericEmph: "#e2e4e5 underline", |
||||||
|
chroma.GenericError: "#ff5c57", |
||||||
|
chroma.GenericHeading: "#e2e4e5 bold", |
||||||
|
chroma.GenericInserted: "#e2e4e5 bold", |
||||||
|
chroma.GenericOutput: "#43454f", |
||||||
|
chroma.GenericPrompt: "#e2e4e5", |
||||||
|
chroma.GenericStrong: "#e2e4e5 italic", |
||||||
|
chroma.GenericSubheading: "#e2e4e5 bold", |
||||||
|
chroma.GenericTraceback: "#e2e4e5", |
||||||
|
chroma.GenericUnderline: "underline", |
||||||
|
chroma.Error: "#ff5c57", |
||||||
|
chroma.Keyword: "#ff6ac1", |
||||||
|
chroma.KeywordConstant: "#ff6ac1", |
||||||
|
chroma.KeywordDeclaration: "#ff5c57", |
||||||
|
chroma.KeywordNamespace: "#ff6ac1", |
||||||
|
chroma.KeywordPseudo: "#ff6ac1", |
||||||
|
chroma.KeywordReserved: "#ff6ac1", |
||||||
|
chroma.KeywordType: "#9aedfe", |
||||||
|
chroma.Literal: "#e2e4e5", |
||||||
|
chroma.LiteralDate: "#e2e4e5", |
||||||
|
chroma.Name: "#e2e4e5", |
||||||
|
chroma.NameAttribute: "#57c7ff", |
||||||
|
chroma.NameBuiltin: "#ff5c57", |
||||||
|
chroma.NameBuiltinPseudo: "#e2e4e5", |
||||||
|
chroma.NameClass: "#f3f99d", |
||||||
|
chroma.NameConstant: "#ff9f43", |
||||||
|
chroma.NameDecorator: "#ff9f43", |
||||||
|
chroma.NameEntity: "#e2e4e5", |
||||||
|
chroma.NameException: "#e2e4e5", |
||||||
|
chroma.NameFunction: "#57c7ff", |
||||||
|
chroma.NameLabel: "#ff5c57", |
||||||
|
chroma.NameNamespace: "#e2e4e5", |
||||||
|
chroma.NameOther: "#e2e4e5", |
||||||
|
chroma.NameTag: "#ff6ac1", |
||||||
|
chroma.NameVariable: "#ff5c57", |
||||||
|
chroma.NameVariableClass: "#ff5c57", |
||||||
|
chroma.NameVariableGlobal: "#ff5c57", |
||||||
|
chroma.NameVariableInstance: "#ff5c57", |
||||||
|
chroma.LiteralNumber: "#ff9f43", |
||||||
|
chroma.LiteralNumberBin: "#ff9f43", |
||||||
|
chroma.LiteralNumberFloat: "#ff9f43", |
||||||
|
chroma.LiteralNumberHex: "#ff9f43", |
||||||
|
chroma.LiteralNumberInteger: "#ff9f43", |
||||||
|
chroma.LiteralNumberIntegerLong: "#ff9f43", |
||||||
|
chroma.LiteralNumberOct: "#ff9f43", |
||||||
|
chroma.Operator: "#ff6ac1", |
||||||
|
chroma.OperatorWord: "#ff6ac1", |
||||||
|
chroma.Other: "#e2e4e5", |
||||||
|
chroma.Punctuation: "#e2e4e5", |
||||||
|
chroma.LiteralString: "#5af78e", |
||||||
|
chroma.LiteralStringBacktick: "#5af78e", |
||||||
|
chroma.LiteralStringChar: "#5af78e", |
||||||
|
chroma.LiteralStringDoc: "#5af78e", |
||||||
|
chroma.LiteralStringDouble: "#5af78e", |
||||||
|
chroma.LiteralStringEscape: "#5af78e", |
||||||
|
chroma.LiteralStringHeredoc: "#5af78e", |
||||||
|
chroma.LiteralStringInterpol: "#5af78e", |
||||||
|
chroma.LiteralStringOther: "#5af78e", |
||||||
|
chroma.LiteralStringRegex: "#5af78e", |
||||||
|
chroma.LiteralStringSingle: "#5af78e", |
||||||
|
chroma.LiteralStringSymbol: "#5af78e", |
||||||
|
chroma.Text: "#e2e4e5", |
||||||
|
chroma.TextWhitespace: "#e2e4e5", |
||||||
|
chroma.Background: " bg:#282a36", |
||||||
|
})) |
Loading…
Reference in new issue