mirror of
https://github.com/luxfi/cli.git
synced 2026-10-30 17:01:20 +00:00
- Update github.com/luxfi/netrunner v1.15.3 → v1.15.4 - Update github.com/luxfi/node v1.22.77 → v1.22.80 - Remove local replace directive for netrunner - Use published package versions for reproducible builds
134 lines
3.8 KiB
YAML
134 lines
3.8 KiB
YAML
# https://golangci-lint.run/usage/configuration/
|
|
version: "2"
|
|
|
|
run:
|
|
timeout: 10m
|
|
|
|
output:
|
|
formats:
|
|
text:
|
|
path: stdout
|
|
colors: true
|
|
|
|
formatters:
|
|
enable:
|
|
- gofmt
|
|
- gofumpt
|
|
- goimports
|
|
|
|
linters:
|
|
default: none
|
|
enable:
|
|
- asciicheck
|
|
# - depguard # disabled: needs v2 config migration
|
|
- errcheck
|
|
- errorlint
|
|
- goconst
|
|
- gocritic
|
|
- revive
|
|
- gosec
|
|
- govet
|
|
- ineffassign
|
|
- misspell
|
|
- nakedret
|
|
- nolintlint
|
|
- prealloc
|
|
- unconvert
|
|
- unparam
|
|
- unused
|
|
- whitespace
|
|
- staticcheck
|
|
exclusions:
|
|
generated: lax
|
|
presets:
|
|
- comments
|
|
rules:
|
|
# Exclude revive's exported rule - too many to fix
|
|
- linters:
|
|
- revive
|
|
text: "exported:"
|
|
# Exclude unused-parameter for interface implementations
|
|
- linters:
|
|
- revive
|
|
text: "unused-parameter:"
|
|
paths:
|
|
- ".*\\.pb\\.go$"
|
|
settings:
|
|
errorlint:
|
|
# Check for plain type assertions and type switches.
|
|
asserts: false
|
|
# Check for plain error comparisons.
|
|
comparison: false
|
|
revive:
|
|
rules:
|
|
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#exported
|
|
- name: exported
|
|
disabled: true
|
|
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unused-parameter
|
|
- name: unused-parameter
|
|
disabled: true
|
|
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#bool-literal-in-expr
|
|
- name: bool-literal-in-expr
|
|
disabled: false
|
|
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#early-return
|
|
- name: early-return
|
|
disabled: false
|
|
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#empty-lines
|
|
- name: empty-lines
|
|
disabled: false
|
|
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#struct-tag
|
|
- name: struct-tag
|
|
disabled: false
|
|
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unexported-naming
|
|
- name: unexported-naming
|
|
disabled: false
|
|
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unhandled-error
|
|
- name: unhandled-error
|
|
disabled: false
|
|
arguments:
|
|
- "fmt.Fprint"
|
|
- "fmt.Fprintf"
|
|
- "fmt.Print"
|
|
- "fmt.Printf"
|
|
- "fmt.Fprintln"
|
|
- "fmt.Println"
|
|
- "rand.Read"
|
|
- "sb.WriteString"
|
|
- "b.WriteString"
|
|
- "h.Write"
|
|
- "hash.Write"
|
|
- "strings.Builder.WriteString"
|
|
- "io.Writer.Write"
|
|
- "(hash.Hash).Write"
|
|
- "(strings.Builder).WriteString"
|
|
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unused-receiver
|
|
- name: unused-receiver
|
|
disabled: false
|
|
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#useless-break
|
|
- name: useless-break
|
|
disabled: false
|
|
staticcheck:
|
|
# https://staticcheck.io/docs/options#checks
|
|
checks:
|
|
- "all"
|
|
- "-SA6002" # argument should be pointer-like to avoid allocation, for sync.Pool
|
|
- "-SA1019" # deprecated packages e.g., golang.org/x/crypto/ripemd160
|
|
# https://golangci-lint.run/usage/linters#gosec
|
|
gosec:
|
|
excludes:
|
|
- G107 # https://securego.io/docs/rules/g107.html
|
|
depguard:
|
|
rules:
|
|
deprecated:
|
|
files:
|
|
- "**/*.go"
|
|
deny:
|
|
- pkg: io/ioutil
|
|
desc: 'io/ioutil is deprecated. Use package io or os instead.'
|
|
test-assert:
|
|
files:
|
|
- "**/*_test.go"
|
|
deny:
|
|
- pkg: github.com/stretchr/testify/assert
|
|
desc: 'github.com/stretchr/testify/require should be used instead.'
|