-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: Rename variables and functions in the module (#62) * update * rename * Revert "feat: Rename variables and functions in the module (#62)" (#69) This reverts commit 281043d. * ci: add github workflow linters --------- Co-authored-by: khanh <[email protected]>
- Loading branch information
Showing
3 changed files
with
168 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: golangci-lint | ||
on: | ||
push: | ||
tags: | ||
- v* | ||
branches: | ||
- main | ||
pull_request: | ||
permissions: | ||
contents: read | ||
# Optional: allow read access to pull request. Use with `only-new-issues` option. | ||
# pull-requests: read | ||
jobs: | ||
golangci: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.19' | ||
- uses: actions/checkout@v4 | ||
- name: golangci-lint | ||
uses: golangci/[email protected] | ||
with: | ||
version: v1.54.2 | ||
args: --timeout 10m |
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 |
---|---|---|
@@ -0,0 +1,122 @@ | ||
run: | ||
tests: true | ||
timeout: 15m | ||
sort-results: true | ||
skip-files: | ||
- server/grpc/gogoreflection/fix_registration.go | ||
- "fix_registration.go" | ||
- ".*\\.pb\\.go$" | ||
- ".*\\.pb\\.gw\\.go$" | ||
- ".*\\.pulsar\\.go$" | ||
- crypto/keys/secp256k1/internal/* | ||
|
||
linters: | ||
disable-all: true | ||
enable: | ||
- dogsled | ||
- errcheck | ||
- exportloopref | ||
- gci | ||
- goconst | ||
- gocritic | ||
- gofumpt | ||
- gosec | ||
- gosimple | ||
- govet | ||
- ineffassign | ||
- misspell | ||
- nakedret | ||
- nolintlint | ||
- revive | ||
- staticcheck | ||
- stylecheck | ||
- thelper | ||
- typecheck | ||
- unconvert | ||
- unused | ||
|
||
issues: | ||
exclude-rules: | ||
- text: "Use of weak random number generator" | ||
linters: | ||
- gosec | ||
- 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 | ||
- text: "leading space" | ||
linters: | ||
- nolintlint | ||
max-issues-per-linter: 10000 | ||
max-same-issues: 10000 | ||
|
||
linters-settings: | ||
gci: | ||
sections: | ||
- standard # Standard section: captures all standard packages. | ||
- default # Default section: contains all imports that could not be matched to another section type. | ||
- blank # blank imports | ||
- dot # dot imports | ||
- prefix(cosmossdk.io) | ||
- prefix(github.com/cosmos/cosmos-sdk) | ||
- prefix(github.com/cometbft/cometbft) | ||
- prefix(github.com/cosmos/ibc-go) | ||
custom-order: true | ||
revive: | ||
rules: | ||
- name: use-any | ||
disabled: true | ||
- name: if-return | ||
disabled: true | ||
- name: max-public-structs | ||
disabled: true | ||
- name: cognitive-complexity | ||
disabled: true | ||
- name: argument-limit | ||
disabled: true | ||
- name: cyclomatic | ||
disabled: true | ||
- name: file-header | ||
disabled: true | ||
- name: function-length | ||
disabled: true | ||
- name: function-result-limit | ||
disabled: true | ||
- name: line-length-limit | ||
disabled: true | ||
- name: flag-parameter | ||
disabled: true | ||
- name: add-constant | ||
disabled: true | ||
- name: empty-lines | ||
disabled: true | ||
- name: banned-characters | ||
disabled: true | ||
- name: deep-exit | ||
disabled: true | ||
- name: confusing-results | ||
disabled: true | ||
- name: unused-parameter | ||
disabled: true | ||
- name: modifies-value-receiver | ||
disabled: true | ||
- name: early-return | ||
disabled: true | ||
- name: confusing-naming | ||
disabled: true | ||
- name: defer | ||
disabled: true | ||
# Disabled in favour of unparam. | ||
- name: unused-parameter | ||
disabled: true | ||
- name: unhandled-error | ||
disabled: false | ||
arguments: | ||
- 'fmt.Printf' | ||
- 'fmt.Print' | ||
- 'fmt.Println' | ||
- 'myFunction' |
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