2022-05-09 05:19:02 +02:00
|
|
|
linters-settings:
|
|
|
|
gofmt:
|
|
|
|
# Simplify code: gofmt with `-s` option.
|
|
|
|
# Default: true
|
|
|
|
simplify: false
|
|
|
|
misspell:
|
|
|
|
locale: US,UK
|
2022-07-20 05:33:08 +02:00
|
|
|
goimports:
|
|
|
|
local-prefixes: github.com/goharbor/harbor
|
2022-07-25 08:12:00 +02:00
|
|
|
stylecheck:
|
|
|
|
checks: [
|
|
|
|
"ST1019", # Importing the same package multiple times.
|
|
|
|
]
|
2022-05-09 05:19:02 +02:00
|
|
|
|
|
|
|
linters:
|
|
|
|
disable-all: true
|
|
|
|
enable:
|
|
|
|
- gofmt
|
|
|
|
- goheader
|
|
|
|
- misspell
|
2022-06-22 05:25:07 +02:00
|
|
|
- typecheck
|
2022-05-09 05:19:02 +02:00
|
|
|
# - dogsled
|
|
|
|
# - dupl
|
|
|
|
# - depguard
|
|
|
|
# - funlen
|
|
|
|
# - goconst
|
|
|
|
# - gocritic
|
|
|
|
# - gocyclo
|
|
|
|
# - goimports
|
|
|
|
# - goprintffuncname
|
2022-06-21 06:01:59 +02:00
|
|
|
- ineffassign
|
2022-05-09 05:19:02 +02:00
|
|
|
# - nakedret
|
|
|
|
# - nolintlint
|
2022-07-01 08:52:47 +02:00
|
|
|
- revive
|
2022-06-16 11:42:46 +02:00
|
|
|
- whitespace
|
2022-05-26 04:32:07 +02:00
|
|
|
- bodyclose
|
|
|
|
- deadcode
|
2022-06-07 11:00:36 +02:00
|
|
|
- errcheck
|
2022-05-09 05:19:02 +02:00
|
|
|
# - gosec
|
2022-06-14 07:44:09 +02:00
|
|
|
- gosimple
|
2022-07-20 05:33:08 +02:00
|
|
|
- goimports
|
2022-05-26 04:32:07 +02:00
|
|
|
- govet
|
2022-05-09 05:19:02 +02:00
|
|
|
# - noctx
|
|
|
|
# - rowserrcheck
|
|
|
|
# - staticcheck
|
2022-06-22 05:25:07 +02:00
|
|
|
- structcheck
|
2022-07-25 08:12:00 +02:00
|
|
|
- stylecheck
|
2022-05-09 05:19:02 +02:00
|
|
|
# - unconvert
|
|
|
|
# - unparam
|
2022-06-22 05:25:07 +02:00
|
|
|
- unused
|
2022-06-21 10:56:36 +02:00
|
|
|
- varcheck
|
2022-05-09 05:19:02 +02:00
|
|
|
|
|
|
|
run:
|
|
|
|
skip-files:
|
|
|
|
- ".*_test.go"
|
|
|
|
- ".*test.go"
|
2022-05-26 04:32:07 +02:00
|
|
|
skip-dirs:
|
2022-06-07 11:00:36 +02:00
|
|
|
- "testing"
|
2022-05-09 05:19:02 +02:00
|
|
|
timeout: 5m
|
|
|
|
|
|
|
|
issue:
|
|
|
|
max-same-issues: 0
|
|
|
|
max-per-linter: 0
|
2022-07-20 05:33:08 +02:00
|
|
|
|
|
|
|
issues:
|
|
|
|
# Excluding configuration per-path, per-linter, per-text and per-source
|
|
|
|
exclude-rules:
|
|
|
|
# Exclude some linters from running on tests files.
|
|
|
|
- path: _test\.go
|
|
|
|
linters:
|
|
|
|
- goimports
|
|
|
|
- path: src/testing/*.go
|
|
|
|
linters:
|
|
|
|
- goimports
|
|
|
|
- path: src/jobservice/mgt/mock_manager.go
|
|
|
|
linters:
|
|
|
|
- goimports
|