Skip to content

Commit

Permalink
add rule to remove extraneous string list to set casting
Browse files Browse the repository at this point in the history
  • Loading branch information
anGie44 committed Dec 8, 2020
1 parent cb4c3cf commit fec3308
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .semgrep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ rules:
regex: '^"github.com/aws/aws-sdk-go/service/[^/]+"$'
severity: WARNING

- id: helper-schema-Set-extraneous-NewSet-with-flattenStringList
languages: [go]
message: Prefer `flattenStringSet()` function for casting a list of string pointers to a set
paths:
include:
- aws/
patterns:
- pattern: schema.NewSet(schema.HashString, flattenStringList($APIOBJECT))
severity: WARNING

- id: helper-schema-ResourceData-GetOk-with-extraneous-conditional
languages: [go]
message: Zero value conditional check after `d.GetOk()` is extraneous
Expand Down

0 comments on commit fec3308

Please sign in to comment.