-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.golangci.yml
More file actions
59 lines (51 loc) · 1.51 KB
/
Copy path.golangci.yml
File metadata and controls
59 lines (51 loc) · 1.51 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
run:
timeout: 5m
tests: true
modules-download-mode: readonly
go: '1.18'
linters:
enable:
- errcheck # Check for unchecked errors
- gosimple # Simplify code
- govet # Reports suspicious constructs
- ineffassign # Detects ineffectual assignments
- staticcheck # Go static analysis
- unused # Checks for unused constants, variables, functions and types
- gofmt # Checks if code is gofmt-ed
- goimports # Check import statements are formatted
- misspell # Finds commonly misspelled words
- revive # Fast, configurable, extensible, flexible, and beautiful linter for Go
- typecheck # Type-checks Go code
- gosec # Inspects source code for security problems
- gocritic # Provides diagnostics that check for bugs, performance and style issues
linters-settings:
errcheck:
check-type-assertions: true
check-blank: true
govet:
enable-all: true
disable:
- shadow
revive:
rules:
- name: exported
severity: warning
disabled: false
gosec:
excludes:
- G104 # Allow unhandled errors in some cases (covered by errcheck)
gocritic:
enabled-tags:
- diagnostic
- performance
- style
issues:
exclude-use-default: false
max-issues-per-linter: 0
max-same-issues: 0
# Exclude some linters from running on tests files
exclude-rules:
- path: _test\.go
linters:
- gosec
- errcheck