Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump golancgi linter version to the latest 1.42.1 #32

Merged
merged 1 commit into from Oct 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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