mirror of
				https://github.com/alecthomas/chroma.git
				synced 2025-10-30 23:57:49 +02:00 
			
		
		
		
	Update to more recent golangci-lint.
This commit is contained in:
		| @@ -14,6 +14,7 @@ linters: | ||||
|     - lll | ||||
|     - gocyclo | ||||
|     - dupl | ||||
|     - gochecknoglobals | ||||
|  | ||||
| linters-settings: | ||||
|   govet: | ||||
|   | ||||
| @@ -2,7 +2,7 @@ sudo: false | ||||
| language: go | ||||
| script: | ||||
|   - go test -v ./... | ||||
|   - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s v1.10.2 | ||||
|   - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s v1.15.0 | ||||
|   - ./bin/golangci-lint run | ||||
|   - git clean -fdx . | ||||
| after_success: | ||||
|   | ||||
| @@ -11,7 +11,7 @@ import ( | ||||
|  | ||||
| 	rice "github.com/GeertJohan/go.rice" | ||||
| 	"github.com/alecthomas/kong" | ||||
| 	"github.com/alecthomas/kong-hcl" | ||||
| 	konghcl "github.com/alecthomas/kong-hcl" | ||||
| 	"github.com/gorilla/csrf" | ||||
| 	"github.com/gorilla/handlers" | ||||
| 	"github.com/gorilla/mux" | ||||
|   | ||||
| @@ -100,6 +100,7 @@ func TestDelegate(t *testing.T) { | ||||
| 	lang, root := makeDelegationTestLexers() | ||||
| 	delegate := DelegatingLexer(root, lang) | ||||
| 	for _, test := range testdata { | ||||
| 		// nolint: scopelint | ||||
| 		t.Run(test.name, func(t *testing.T) { | ||||
| 			it, err := delegate.Tokenise(nil, test.source) | ||||
| 			assert.NoError(t, err) | ||||
|   | ||||
| @@ -619,13 +619,14 @@ func haxePreProcMutator(state *LexerState) error { | ||||
| 	} | ||||
|  | ||||
| 	proc := state.Groups[2] | ||||
| 	if proc == "if" { | ||||
| 	switch proc { | ||||
| 	case "if": | ||||
| 		stack = append(stack, state.Stack) | ||||
| 	} else if proc == "else" || proc == "elseif" { | ||||
| 	case "else", "elseif": | ||||
| 		if len(stack) > 0 { | ||||
| 			state.Stack = stack[len(stack)-1] | ||||
| 		} | ||||
| 	} else if proc == "end" { | ||||
| 	case "end": | ||||
| 		stack = stack[:len(stack)-1] | ||||
| 	} | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user