Skip to content

Commit

Permalink
Update to more recent golangci-lint.
Browse files Browse the repository at this point in the history
  • Loading branch information
alecthomas committed Jul 19, 2019
1 parent 2ec7e6c commit bbbfbe4
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ linters:
- lll
- gocyclo
- dupl
- gochecknoglobals

linters-settings:
govet:
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion cmd/chromad/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions delegate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 4 additions & 3 deletions lexers/h/haxe.go
Original file line number Diff line number Diff line change
Expand Up @@ -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]
}

Expand Down

0 comments on commit bbbfbe4

Please sign in to comment.