-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.golangci.yml
More file actions
32 lines (28 loc) · 1.05 KB
/
.golangci.yml
File metadata and controls
32 lines (28 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
version: '2'
run:
timeout: 5m
linters:
enable:
- errcheck # Detect unchecked errors
- govet # Examine Go source code for suspicious constructs
- ineffassign # Detect ineffectual assignments
- staticcheck # Go static analysis tool
- unused # Check for unused constants, variables, functions and types
- revive # Fast, configurable, extensible, flexible, and beautiful linter
- misspell # Fix spelling errors
- gosec # Security checker
- unconvert # Remove unnecessary type conversions
- whitespace # Check for unnecessary whitespace
- godot # Check if comments end in a period
- gocyclo # Checks cyclomatic complexity
- prealloc # Find slice declarations that could be preallocated
settings:
gosec:
excludes:
- G301 # Directory permissions (acceptable in tests)
- G304 # Potential file inclusion via variable (safe in tests)
- G306 # File permissions (acceptable in tests)
formatters:
enable:
- gofmt
- goimports