math-optim/.golangci.yml

104 lines
2.3 KiB
YAML
Raw Normal View History

2023-01-12 23:35:51 +01:00
# Copyright 2023 wanderer <a_mirre at utb dot cz>
2022-06-14 16:46:11 +02:00
# SPDX-License-Identifier: GPL-3.0-or-later
---
run:
2022-08-23 14:38:18 +02:00
go: 1.18.5
2022-06-14 16:46:11 +02:00
tests: true
issues:
max-issues-per-linter: 0
max-same-issues: 0
linters:
enable:
- bidichk
2022-12-24 11:30:22 +01:00
# - dupl
2022-09-01 21:10:10 +02:00
# The linter 'deadcode' is deprecated (since v1.49.0) due to: The owner
# seems to have abandoned the linter. Replaced by unused.
# - deadcode
2022-06-14 16:46:11 +02:00
- decorder
- dogsled
- exportloopref
- forbidigo
- gas
- gocognit
- goconst
- gocritic
- godot
- govet
- gofmt
- gofumpt
- goimports
- goprintffuncname
- gosec
- ineffassign
# The linter 'ifshort' is deprecated (since v1.48.0) due to: The repository
# of the linter has been deprecated by the owner.
# - ifshort
2022-06-14 16:46:11 +02:00
- misspell
# - prealloc # disable for now as it might be premature optimisation
- revive
2023-02-24 14:24:57 +01:00
- tparallel
2022-06-14 16:46:11 +02:00
- unconvert
- unparam
2022-09-01 21:10:10 +02:00
- unused
# The linter 'varcheck' is deprecated (since v1.49.0) due to: The owner
# seems to have abandoned the linter. Replaced by unused.
# - varcheck
- wastedassign
2022-06-14 16:46:11 +02:00
- whitespace
- wsl
linter-settings:
dupl:
threshold: 100
gocritic:
enabled-tags:
- diagnostic
- experimental
- opinionated
- performance
- style
disabled-checks:
- dupImport # https://github.com/go-critic/go-critic/issues/845
- ifElseChain
- octalLiteral
- whyNoLint
- wrapperFunc
gocyclo:
min-complexity: 15
gofumpt:
extra-rules: true
lang-version: "1.18"
govet:
check-shadowing: true
revive:
severity: warning
confidence: 0.8
errorCode: 1
warningCode: 1
rules:
- name: blank-imports
- name: context-as-argument
- name: context-keys-type
- name: dot-imports
- name: error-return
- name: error-strings
- name: error-naming
- name: exported
- name: if-return
- name: increment-decrement
- name: var-naming
- name: var-declaration
- name: package-comments
- name: range
- name: receiver-naming
- name: time-naming
- name: unexported-return
- name: indent-error-flow
- name: errorf
- name: duplicated-imports
- name: modifies-value-receiver
...