Skip to content

Commit 970d4e8

Browse files
committed
upgrade docs
Signed-off-by: sivchari <shibuuuu5@gmail.com>
1 parent ab8b31f commit 970d4e8

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,11 @@ Will be flagged by this linter, while something like:
176176
// +kubebuilder:validation:MaxLength=11
177177
will not.
178178

179+
### Fixes
180+
181+
The `duplicatemarkers` linter can automatically fix all markers that are exact match to another markers.
182+
If there are duplicates across types and fields, field markers are removed in priority to type markers.
183+
179184
## Integers
180185

181186
The `integers` linter checks for usage of unsupported integer types.

pkg/analysis/duplicatemarkers/analyzer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const (
3737
// It checks for duplicate markers on struct fields.
3838
var Analyzer = &analysis.Analyzer{
3939
Name: name,
40-
Doc: "Check for duplicate markers on struct fields.",
40+
Doc: "Check for duplicate markers on defined types and struct fields.",
4141
Run: run,
4242
Requires: []*analysis.Analyzer{inspector.Analyzer},
4343
}

pkg/analysis/duplicatemarkers/doc.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,8 @@ would not be reported while something like:
3535
}
3636
3737
would be reported.
38+
39+
This linter also be able to automatically fix all markers that are exact match to another markers.
40+
If there are duplicates across types and fields, field markers are removed in priority to type markers.
3841
*/
3942
package duplicatemarkers

0 commit comments

Comments
 (0)