-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.golangci.yml
More file actions
93 lines (78 loc) · 2.24 KB
/
Copy path.golangci.yml
File metadata and controls
93 lines (78 loc) · 2.24 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
version: "2"
run:
timeout: 5m
modules-download-mode: readonly
linters:
default: standard
enable:
# Additional recommended linters
- bodyclose # Check HTTP response body is closed
- dogsled # Check for too many blank identifiers
- dupl # Check for duplicated code
- errorlint # Check error wrapping
- exhaustive # Check exhaustiveness of enum switch statements
- gochecknoinits # Check for init functions
- goconst # Find repeated strings that could be constants
- gocritic # Opinionated linter
- goprintffuncname # Check printf-like function names
- gosec # Security checks
- misspell # Check for misspelled English words
- nilerr # Check for nil error returns
- noctx # Check for HTTP requests without context
- prealloc # Find slice declarations that could be preallocated
- unconvert # Remove unnecessary type conversions
- unparam # Find unused function parameters
- whitespace # Check for unnecessary whitespace
disable:
# Disabled for Terraform providers - these implement framework interfaces
- revive
settings:
dupl:
threshold: 150
exhaustive:
default-signifies-exhaustive: true
goconst:
min-len: 3
min-occurrences: 3
gocritic:
disabled-checks:
- ifElseChain # Sometimes clearer than switch
misspell:
locale: US
exclusions:
presets:
- std-error-handling
- common-false-positives
rules:
# Test files have repetitive patterns and don't need strict error handling
- path: _test\.go
linters:
- dupl
- goconst
- errorlint
- path: internal/resources/
linters:
- dupl
- goconst
- path: internal/datasources/
linters:
- dupl
- goconst
- path: internal/acctest/
linters:
- goconst
- path: internal/codegen/
linters:
- goconst
formatters:
enable:
- gofmt
- goimports
settings:
gofmt:
simplify: true
goimports:
local-prefixes:
- github.com/ory/terraform-provider-ory
output:
show-stats: true