Skip to content

Commit 9e8c3d8

Browse files
committed
feat: add revive useless-break to 03-safe
1 parent 4480ec8 commit 9e8c3d8

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

03-safe/.golangci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Author: @ccoVeille
55
# License: MIT
66
# Variant: 03-safe
7-
# Version: v1.1.0
7+
# Version: v1.2.0
88
#
99
linters:
1010
# some linters are enabled by default
@@ -132,6 +132,9 @@ linters-settings:
132132
# Functions or methods with unused parameters can be a symptom of an unfinished refactoring or a bug.
133133
- name: unused-parameter
134134

135+
# warns on useless break statements in case clauses of switch and select statements
136+
- name: useless-break
137+
135138
# report when a variable declaration can be simplified
136139
- name: var-declaration
137140

03-safe/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ It's [02-basic](../02-basic) plus :
1111
- [misspell](#misspell)
1212
- [fatcontext](#fatcontext)
1313
- [loggercheck](#loggercheck)
14+
- [revive](#revive)
15+
- [useless-break](useless-break)
1416

1517
## License
1618

@@ -120,6 +122,9 @@ spots and proposes to remove unreachable code. also helps to spot errors
120122
#### unused-parameter
121123
Functions or methods with unused parameters can be a symptom of an unfinished refactoring or a bug.
122124

125+
#### useless-break
126+
warns on useless break statements in case clauses of switch and select statements
127+
123128
#### var-declaration
124129
report when a variable declaration can be simplified
125130

0 commit comments

Comments
 (0)