Skip to content

Commit bb7a7e5

Browse files
committed
Updates Semgrep checks for error checking patterns
1 parent 8425b7c commit bb7a7e5

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

.ci/semgrep/retry/retry.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,12 @@ rules:
77
fix: |
88
retry.NotFound($ERR)
99
severity: ERROR
10+
11+
- id: internal-retry-timedout
12+
languages: [go]
13+
message: "Prefer retry.TimedOut to tfresource.TimedOut"
14+
pattern: |
15+
tfresource.TimedOut($ERR)
16+
fix: |
17+
retry.TimedOut($ERR)
18+
severity: ERROR

internal/vcr/.semgrep-vcr.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -222,18 +222,6 @@ rules:
222222
include:
223223
- "**/*.go"
224224

225-
- id: internal-retry-timedout
226-
languages: [go]
227-
message: "Use retry.TimedOut to replace the deprecated tfresource alias"
228-
severity: WARNING
229-
pattern: |
230-
tfresource.TimedOut($ERR)
231-
fix: |
232-
retry.TimedOut($ERR)
233-
paths:
234-
include:
235-
- "**/*.go"
236-
237225
- id: internal-retry-setlasterror
238226
languages: [go]
239227
message: "Use retry.SetLastError to replace the deprecated tfresource alias"

0 commit comments

Comments
 (0)