Skip to content

Commit 31682b0

Browse files
authored
feat: Migrate github.com/urfave/cli from v2 to v3 (#164)
* chore: bump go tools to 1.7.6 * chore: migrate golangci to v2 config * fix: goreleaser config * chore: remove tools directive from go.mod * feat: Migrate github.com/urfave/cli from v2 to v3 * fix: linter configs
1 parent e6a155a commit 31682b0

File tree

127 files changed

+7144
-19373
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

127 files changed

+7144
-19373
lines changed

.golangci.pipe.yml

Lines changed: 86 additions & 119 deletions
Original file line numberDiff line numberDiff line change
@@ -1,128 +1,95 @@
1+
version: "2"
2+
run:
3+
issues-exit-code: 1
4+
tests: true
5+
output:
6+
formats:
7+
text:
8+
checkstyle:
9+
path: report.xml
10+
path-prefix: ""
111
linters:
2-
disable-all: true
12+
default: none
313
enable:
414
- errcheck
5-
- gofmt
615
- revive
7-
- goimports
16+
- staticcheck
817
- unused
9-
- gosimple
10-
11-
linters-settings:
12-
errcheck:
13-
check-type-assertions: true
14-
check-blank: true
15-
gofmt:
16-
simplify: true
17-
goimports:
18-
local-prefixes: github.com/obalunenko/georgia-tax-calculator/
19-
revive:
20-
# see https://github.com/mgechev/revive#available-rules for details.
21-
ignore-generated-header: true
22-
severity: warning
23-
rules:
24-
- name: indent-error-flow
25-
severity: warning
26-
- name: exported
27-
severity: warning
28-
- name: defer
29-
severity: warning
30-
arguments: [ [ "call-chain", "loop", "method-call", "recover", "return" ] ]
31-
32-
issues:
33-
exclude-use-default: false
34-
exclude:
35-
# for "public interface + private struct implementation" cases only!
36-
- exported func * returns unexported type *, which can be annoying to use
37-
- should have a package comment, unless it's in another file for this package
38-
# Excluding configuration per-path, per-linter, per-text and per-source
39-
exclude-rules:
40-
# Exclude some linters from running on tests files.
41-
- path: _test\.go
42-
linters:
43-
- gocyclo
44-
- funlen
45-
- dupl
46-
- gosec
47-
- path: internal/input/
48-
linters:
49-
- gocyclo
50-
- funlen
51-
- godot
52-
- godox
53-
- dupl
54-
- gofmt
55-
- gci
56-
- gofumpt
57-
- goimports
58-
- gosimple
59-
- path: internal/puzzles/constants.go
60-
linters:
61-
- revive
62-
63-
# Show only new issues: if there are unstaged changes or untracked files,
64-
# only those changes are analyzed, else only changes in HEAD~ are analyzed.
65-
# It's a super-useful option for integration of golangci-lint into existing
66-
# large codebase. It's not practical to fix all existing issues at the moment
67-
# of integration: much better don't allow issues in new code.
68-
# Default is false.
69-
new: true
70-
71-
# Fix found issues (if it's supported by the linter)
72-
fix: false
73-
74-
severity:
75-
# Default value is empty string.
76-
# Set the default severity for issues. If severity rules are defined and the issues
77-
# do not match or no severity is provided to the rule this will be the default
78-
# severity applied. Severities should match the supported severity names of the
79-
# selected out format.
80-
# - Code climate: https://docs.codeclimate.com/docs/issues#issue-severity
81-
# - Checkstyle: https://checkstyle.sourceforge.io/property_types.html#severity
82-
# - GitHub: https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-error-message
83-
default-severity: error
84-
85-
# The default value is false.
86-
# If set to true severity-rules regular expressions become case sensitive.
87-
case-sensitive: false
88-
89-
# Default value is empty list.
90-
# When a list of severity rules are provided, severity information will be added to lint
91-
# issues. Severity rules have the same filtering capability as exclude rules except you
92-
# are allowed to specify one matcher per severity rule.
93-
# Only affects out formats that support setting severity information.
18+
settings:
19+
errcheck:
20+
check-type-assertions: true
21+
check-blank: true
22+
revive:
23+
severity: warning
24+
rules:
25+
- name: indent-error-flow
26+
severity: warning
27+
- name: exported
28+
severity: warning
29+
- name: defer
30+
arguments:
31+
- - call-chain
32+
- loop
33+
- method-call
34+
- recover
35+
- return
36+
severity: warning
37+
exclusions:
38+
generated: lax
9439
rules:
9540
- linters:
9641
- dupl
97-
severity: warning
98-
99-
run:
100-
issues-exit-code: 1
101-
tests: true
102-
exclude-dirs:
103-
- vendor/
104-
exclude-files:
105-
- \.pb\.go$
106-
107-
# output configuration options
108-
output:
109-
# colored-line-number|line-number|json|tab|checkstyle|code-climate|junit-xml|github-actions
110-
# default is "colored-line-number"
111-
formats: github-actions
112-
113-
# print lines of code with issue, default is true
114-
print-issued-lines: true
115-
116-
# print linter name in the end of issue text, default is true
117-
print-linter-name: true
118-
119-
# make issues output unique by line, default is true
42+
- funlen
43+
- gocyclo
44+
- gosec
45+
path: _test\.go
46+
- linters:
47+
- dupl
48+
- funlen
49+
- gocyclo
50+
- godot
51+
- godox
52+
- staticcheck
53+
path: internal/input/
54+
- linters:
55+
- revive
56+
path: internal/puzzles/constants.go
57+
- path: (.+)\.go$
58+
text: exported func * returns unexported type *, which can be annoying to use
59+
- path: (.+)\.go$
60+
text: should have a package comment, unless it's in another file for this package
61+
paths:
62+
- \.pb\.go$
63+
- vendor/
64+
- third_party$
65+
- builtin$
66+
- examples$
67+
issues:
12068
uniq-by-line: true
121-
122-
# add a prefix to the output file references; default is no prefix
123-
path-prefix: ""
124-
125-
# sorts results by: filepath, line and column
126-
sort-results: true
127-
128-
69+
new: true
70+
fix: false
71+
severity:
72+
default: error
73+
rules:
74+
- linters:
75+
- dupl
76+
severity: warning
77+
formatters:
78+
enable:
79+
- gofmt
80+
- goimports
81+
settings:
82+
gofmt:
83+
simplify: true
84+
goimports:
85+
local-prefixes:
86+
- github.com/obalunenko/georgia-tax-calculator/
87+
exclusions:
88+
generated: lax
89+
paths:
90+
- \.pb\.go$
91+
- vendor/
92+
- third_party$
93+
- builtin$
94+
- examples$
95+
- internal/input/

0 commit comments

Comments
 (0)