Skip to content

Commit

Permalink
bump golancgi linter version to the latest 1.42.1 (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
ppapapetrou76 committed Oct 18, 2021
1 parent 86a9459 commit 6f3b265
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
8 changes: 0 additions & 8 deletions .golangci.yml
Expand Up @@ -13,7 +13,6 @@ issues:
- scopelint
- funlen
- maligned
- golint
- paralleltest
- testpackage
- goerr113
Expand Down Expand Up @@ -46,17 +45,10 @@ linters-settings:
gofmt:
simplify: true

golint:
min-confidence: 0

gocyclo:
# minimal code complexity to report, 30 by default (we should lower it to around 15-17)
min-complexity: 25

maligned:
# print struct with more effective memory layout or not, false by default
suggest-new: true

misspell:
locale: neutral

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -39,7 +39,7 @@ deps:
@ echo "-> Installing project dependencies..."
@ GO111MODULE=off go get -u github.com/myitcv/gobin
@ $(GOBIN)/gobin golang.org/x/lint/golint
@ curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(GOBIN) v1.37.0
@ curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(GOBIN) v1.42.1
@ echo "-> Done."

## Formats code and fixes as many as possible linter errors
Expand Down
5 changes: 4 additions & 1 deletion internal/pkg/values/string_value.go
Expand Up @@ -171,7 +171,10 @@ func (s StringValue) AddDecorator(decorator StringDecorator) StringValue {
}

func (s StringValue) decoratedValue(value interface{}) string {
decoratedValue := value.(string)
decoratedValue, ok := value.(string)
if !ok {
return ""
}
for _, decorator := range s.decorators {
decoratedValue = decorator(decoratedValue)
}
Expand Down

0 comments on commit 6f3b265

Please sign in to comment.