From 01a5f22619bc507fc6858f4f48f9ce19f77a5f42 Mon Sep 17 00:00:00 2001 From: Rafael Tenfen Date: Wed, 8 Jun 2022 11:31:54 -0300 Subject: [PATCH] fix: lint runner warnings (#1008) ## Description - Remove lint runner warnings from `make lint` > Note: there are still linters context warnings [because of go1.18](https://github.com/golangci/golangci-lint/issues/2649) ---- ### Author Checklist *All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow up issues.* I have... - [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] added appropriate labels to the PR - [ ] added `!` to the type prefix if API or client breaking change - [ ] targeted the correct branch (see [PR Targeting](https://github.com/umee-network/umee/blob/main/CONTRIBUTING.md#pr-targeting)) - [ ] provided a link to the relevant issue or specification - [ ] added a changelog entry to `CHANGELOG.md` - [ ] included comments for [documenting Go code](https://blog.golang.org/godoc) - [ ] updated the relevant documentation or specification - [ ] reviewed "Files changed" and left comments if necessary - [ ] confirmed all CI checks have passed ### Reviewers Checklist *All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items.* I have... - [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] confirmed `!` in the type prefix if API or client breaking change - [ ] confirmed all author checklist items have been addressed - [ ] reviewed state machine logic - [ ] reviewed API design and naming - [ ] reviewed documentation is accurate - [ ] reviewed tests and test coverage - [ ] manually tested (if applicable) --- .golangci.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 20f50b3b20..6e0ace0c25 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -4,6 +4,13 @@ run: - tests/e2e - tests/simulation + govet: + # Enable analyzers by name (in addition to default). + # Run `go tool vet help` to see all analyzers. + # Default: [] + enable: + - fieldalignment + linters: enable: - bodyclose @@ -15,17 +22,16 @@ linters: - gocritic - gofmt - goimports - - golint + - revive - gosec - gosimple - govet - ineffassign - lll - misspell - - maligned - nakedret - prealloc - - scopelint + - exportloopref - staticcheck - structcheck - stylecheck @@ -54,8 +60,11 @@ linters-settings: max-blank-identifiers: 3 golint: min-confidence: 0 - maligned: - suggest-new: true + revive: + # Sets the default failure confidence. + # This means that linting errors with less than 0.8 confidence will be ignored. + # Default: 0.8 + confidence: 0 misspell: locale: US nolintlint: