Skip to content

Commit

Permalink
chore(lint): add new rule for set
Browse files Browse the repository at this point in the history
Signed-off-by: knqyf263 <[email protected]>
  • Loading branch information
knqyf263 committed Dec 20, 2024
1 parent 360e6e0 commit 91834d9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions misc/lint/rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,8 @@ func errorsJoin(m dsl.Matcher) {
m.Match(`errors.Join($*args)`).
Report("use github.com/hashicorp/go-multierror.Append instead of errors.Join.")
}

func mapSet(m dsl.Matcher) {
m.Match(`map[$x]struct{}`).
Report("use github.com/aquasecurity/trivy/pkg/set.Set instead of map.")
}

0 comments on commit 91834d9

Please sign in to comment.