45 lines
1.2 KiB
YAML
45 lines
1.2 KiB
YAML
version: "2"
|
|
|
|
linters:
|
|
enable:
|
|
- errcheck # Check all error return values
|
|
- govet # Suspicious Go constructs
|
|
- staticcheck # Large set of static analysis checks
|
|
- ineffassign # Detect ineffectual assignments
|
|
- unused # Find unused code
|
|
- gofmt # Formatting
|
|
- goimports # Import ordering
|
|
- gocritic # Common Go mistakes
|
|
- noctx # HTTP requests should use context
|
|
- bodyclose # HTTP response body must be closed
|
|
- exhaustive # Exhaustive enum switch
|
|
- godot # Comments should end with a period
|
|
- misspell # Spelling errors in comments/strings
|
|
- whitespace # Unnecessary blank lines
|
|
|
|
settings:
|
|
errcheck:
|
|
check-type-assertions: true
|
|
govet:
|
|
enable-all: true
|
|
staticcheck:
|
|
checks: ["all"]
|
|
godot:
|
|
scope: declarations
|
|
|
|
linters-settings:
|
|
goimports:
|
|
local-prefixes: github.com/veylant/ia-gateway
|
|
|
|
issues:
|
|
exclude-rules:
|
|
# Allow _ in test files for assertion patterns
|
|
- path: _test\.go
|
|
linters: [errcheck]
|
|
# Generated proto files are not our code
|
|
- path: gen/
|
|
linters: ["all"]
|
|
|
|
run:
|
|
timeout: 5m
|