-
Notifications
You must be signed in to change notification settings - Fork 10
/
.golangci.yml
121 lines (116 loc) · 3.57 KB
/
.golangci.yml
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
run:
tests: false
timeout: 20m
linters:
disable:
- errcheck
enable:
- goconst
- gocyclo
- gofmt
- goimports
- gosec
- govet
- misspell
- revive
- unused
- whitespace
linters-settings:
goimports:
local-prefixes: github.com/flomesh-io/fsm
revive:
rules:
- name: unused-parameter
disabled: true
gosec:
exclude-generated: true
severity: medium
confidence: medium
issues:
exclude-dirs:
- pkg/gen
- pkg/bugreport
exclude-files:
- "zz_generated.deepcopy.go$"
- "zz_generated.register.go$"
exclude-rules:
# Ignore error for ginkgo and gomega dot imports
- linters:
- revive
source: ". \"github.com/onsi/(ginkgo|gomega)\""
text: "dot imports"
# Ignore error for test framework imports
- linters:
- revive
source: ". \"github.com/flomesh-io/fsm/tests/framework\""
text: "dot imports"
# Exclude staticcheck messages for deprecated function, variable or constant
# This causes issues with package github.com/golang/protobuf/proto
- linters:
- staticcheck
text: "SA1019:"
- linters:
- gosec
text: "G101:"
- linters:
- gosec
text: "G115:"
- linters:
- gosimple
text: "S1009:"
- linters:
- govet
text: "printf: non-constant format string in call to"
exclude-use-default: false
# output configuration options
output:
# Format: colored-line-number|line-number|json|colored-tab|tab|checkstyle|code-climate|junit-xml|github-actions|teamcity
#
# Multiple can be specified by separating them by comma, output can be provided
# for each of them by separating format name and path by colon symbol.
# Output path can be either `stdout`, `stderr` or path to the file to write to.
# Example: "checkstyle:report.xml,json:stdout,colored-line-number"
#
# Default: colored-line-number
formats:
- format: colored-line-number
# Print lines of code with issue.
# Default: true
print-issued-lines: true
# Print linter name in the end of issue text.
# Default: true
print-linter-name: true
# Make issues output unique by line.
# Default: true
uniq-by-line: true
# Add a prefix to the output file references.
# Default is no prefix.
path-prefix: ""
# Sort results by: filepath, line and column.
sort-results: true
severity:
# Set the default severity for issues.
#
# If severity rules are defined and the issues do not match or no severity is provided to the rule
# this will be the default severity applied.
# Severities should match the supported severity names of the selected out format.
# - Code climate: https://docs.codeclimate.com/docs/issues#issue-severity
# - Checkstyle: https://checkstyle.sourceforge.io/property_types.html#SeverityLevel
# - GitHub: https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-error-message
# - TeamCity: https://www.jetbrains.com/help/teamcity/service-messages.html#Inspection+Instance
#
# Default value is an empty string.
default-severity: "error"
# If set to true `severity-rules` regular expressions become case-sensitive.
# Default: false
case-sensitive: true
# When a list of severity rules are provided, severity information will be added to lint issues.
# Severity rules have the same filtering capability as exclude rules
# except you are allowed to specify one matcher per severity rule.
# Only affects out formats that support setting severity information.
#
# Default: []
rules:
- linters:
- dupl
severity: info