forked from osmosis-labs/iavl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
59a7e82
commit aa547ba
Showing
15 changed files
with
118 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,31 @@ | ||
name: Lint | ||
# Lint runs golangci-lint over the entire cosmos-sdk repository | ||
# This workflow is run on every pull request and push to master | ||
# The `golangci` will pass without running if no *.{go, mod, sum} files have been changed. | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
golangci-lint: | ||
golangci: | ||
name: golangci-lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: golangci/[email protected] | ||
- uses: actions/[email protected] | ||
with: | ||
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. | ||
version: v1.32 | ||
args: --timeout 10m | ||
github-token: ${{ secrets.github_token }} | ||
go-version: 1.17 | ||
- uses: technote-space/[email protected] | ||
id: git_diff | ||
with: | ||
PATTERNS: | | ||
**/**.go | ||
go.mod | ||
go.sum | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: latest | ||
args: --out-format=tab | ||
skip-go-installation: true | ||
if: env.GIT_DIFF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,74 @@ | ||
run: | ||
tests: false | ||
# timeout for analysis, e.g. 30s, 5m, default is 1m | ||
timeout: 5m | ||
|
||
linters: | ||
disable-all: true | ||
enable: | ||
- bodyclose | ||
- deadcode | ||
- depguard | ||
- dogsled | ||
- dupl | ||
- errcheck | ||
# - funlen | ||
# - gochecknoglobals | ||
# - gochecknoinits | ||
# - errcheck | ||
- exportloopref | ||
- goconst | ||
- gocritic | ||
# - gocyclo | ||
# - godox | ||
- gofmt | ||
- goimports | ||
- golint | ||
- gosec | ||
- gosimple | ||
- govet | ||
- ineffassign | ||
- interfacer | ||
# - lll | ||
- misspell | ||
- maligned | ||
- nakedret | ||
- nolintlint | ||
- prealloc | ||
- scopelint | ||
- revive | ||
- staticcheck | ||
- structcheck | ||
- stylecheck | ||
- typecheck | ||
- unconvert | ||
# - unparam | ||
- varcheck | ||
- unparam | ||
- unused | ||
# - whitespace | ||
# - wsl | ||
# - gocognit | ||
- nolintlint | ||
disable: | ||
|
||
issues: | ||
exclude-rules: | ||
- path: _test\.go | ||
- text: "Use of weak random number generator" | ||
linters: | ||
- gosec | ||
- linters: | ||
- lll | ||
source: "https://" | ||
- text: "comment on exported var" | ||
linters: | ||
- golint | ||
- text: "don't use an underscore in package name" | ||
linters: | ||
- golint | ||
- text: "ST1003:" | ||
linters: | ||
- stylecheck | ||
# FIXME: Disabled until golangci-lint updates stylecheck with this fix: | ||
# https://github.com/dominikh/go-tools/issues/389 | ||
- text: "ST1016:" | ||
linters: | ||
- stylecheck | ||
- path: "migrations" | ||
text: "SA1019:" | ||
linters: | ||
- staticcheck | ||
|
||
max-issues-per-linter: 10000 | ||
max-same-issues: 10000 | ||
|
||
linters-settings: | ||
dogsled: | ||
max-blank-identifiers: 3 | ||
maligned: | ||
# print struct with more effective memory layout or not, false by default | ||
suggest-new: true | ||
govet: | ||
check-shadowing: true | ||
golint: | ||
min-confidence: 0 | ||
misspell: | ||
locale: US | ||
# gocritic: | ||
# enabled-tags: | ||
# - performance | ||
# - style | ||
# - experimental | ||
nolintlint: | ||
allow-unused: false | ||
allow-leading-space: true | ||
require-explanation: false | ||
require-specific: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.