Skip to content

Commit d74e0fd

Browse files
authored
Merge pull request #44164 from hashicorp/td-update-semgrep-paths
Update semgrep config to anchor paths
2 parents 8b2707d + 1f765df commit d74e0fd

33 files changed

+2318
-2318
lines changed

.ci/.semgrep-caps-aws-ec2.yml

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ rules:
66
message: Do not use "AWS" in func name inside AWS Provider
77
paths:
88
include:
9-
- internal
9+
- "/internal"
1010
exclude:
11-
- internal/service/securitylake/aws_log_source.go
12-
- internal/service/securitylake/aws_log_source_test.go
13-
- internal/service/*/service_endpoints_gen_test.go
11+
- "/internal/service/securitylake/aws_log_source.go"
12+
- "/internal/service/securitylake/aws_log_source_test.go"
13+
- "/internal/service/*/service_endpoints_gen_test.go"
1414
patterns:
1515
- pattern: func $NAME( ... ) { ... }
1616
- metavariable-pattern:
@@ -25,10 +25,10 @@ rules:
2525
message: Do not use "AWS" in const name inside AWS Provider
2626
paths:
2727
include:
28-
- internal
28+
- "/internal"
2929
exclude:
30-
- internal/service/securitylake/aws_log_source.go
31-
- internal/service/*/service_endpoints_gen_test.go
30+
- "/internal/service/securitylake/aws_log_source.go"
31+
- "/internal/service/*/service_endpoints_gen_test.go"
3232
patterns:
3333
- pattern: const $NAME = ...
3434
- metavariable-pattern:
@@ -43,11 +43,11 @@ rules:
4343
message: Do not use "AWS" in var name inside AWS Provider
4444
paths:
4545
include:
46-
- internal
46+
- "/internal"
4747
exclude:
48-
- internal/service/securitylake/aws_log_source.go
49-
- internal/service/securitylake/exports_test.go
50-
- internal/service/*/service_endpoints_gen_test.go
48+
- "/internal/service/securitylake/aws_log_source.go"
49+
- "/internal/service/securitylake/exports_test.go"
50+
- "/internal/service/*/service_endpoints_gen_test.go"
5151
patterns:
5252
- pattern: var $NAME = ...
5353
- metavariable-pattern:
@@ -62,7 +62,7 @@ rules:
6262
message: Use correct caps in func name (i.e., HTTPS or https, not Https) (see list at https://github.com/hashicorp/terraform-provider-aws/blob/main/names/caps.md)
6363
paths:
6464
include:
65-
- internal
65+
- "/internal"
6666
patterns:
6767
- pattern: func $NAME( ... ) { ... }
6868
- metavariable-pattern:
@@ -77,7 +77,7 @@ rules:
7777
message: Use correct caps in const name (i.e., HTTPS or https, not Https) (see list at https://github.com/hashicorp/terraform-provider-aws/blob/main/names/caps.md)
7878
paths:
7979
include:
80-
- internal
80+
- "/internal"
8181
patterns:
8282
- pattern: const $NAME = ...
8383
- metavariable-pattern:
@@ -91,7 +91,7 @@ rules:
9191
message: Use correct caps in var name (i.e., HTTPS or https, not Https) (see list at https://github.com/hashicorp/terraform-provider-aws/blob/main/names/caps.md)
9292
paths:
9393
include:
94-
- internal
94+
- "/internal"
9595
patterns:
9696
- pattern: var $NAME = ...
9797
- metavariable-pattern:
@@ -105,7 +105,7 @@ rules:
105105
message: Use correct caps in func name (i.e., HTTPS or https, not Https) (see list at https://github.com/hashicorp/terraform-provider-aws/blob/main/names/caps.md)
106106
paths:
107107
include:
108-
- internal
108+
- "/internal"
109109
patterns:
110110
- pattern: func $NAME( ... ) { ... }
111111
- metavariable-pattern:
@@ -120,7 +120,7 @@ rules:
120120
message: Use correct caps in const name (i.e., HTTPS or https, not Https) (see list at https://github.com/hashicorp/terraform-provider-aws/blob/main/names/caps.md)
121121
paths:
122122
include:
123-
- internal
123+
- "/internal"
124124
patterns:
125125
- pattern: const $NAME = ...
126126
- metavariable-pattern:
@@ -134,7 +134,7 @@ rules:
134134
message: Use correct caps in var name (i.e., HTTPS or https, not Https) (see list at https://github.com/hashicorp/terraform-provider-aws/blob/main/names/caps.md)
135135
paths:
136136
include:
137-
- internal
137+
- "/internal"
138138
patterns:
139139
- pattern: var $NAME = ...
140140
- metavariable-pattern:
@@ -148,7 +148,7 @@ rules:
148148
message: Use correct caps in func name (i.e., HTTPS or https, not Https) (see list at https://github.com/hashicorp/terraform-provider-aws/blob/main/names/caps.md)
149149
paths:
150150
include:
151-
- internal
151+
- "/internal"
152152
patterns:
153153
- pattern: func $NAME( ... ) { ... }
154154
- metavariable-pattern:
@@ -163,7 +163,7 @@ rules:
163163
message: Use correct caps in const name (i.e., HTTPS or https, not Https) (see list at https://github.com/hashicorp/terraform-provider-aws/blob/main/names/caps.md)
164164
paths:
165165
include:
166-
- internal
166+
- "/internal"
167167
patterns:
168168
- pattern: const $NAME = ...
169169
- metavariable-pattern:
@@ -177,7 +177,7 @@ rules:
177177
message: Use correct caps in var name (i.e., HTTPS or https, not Https) (see list at https://github.com/hashicorp/terraform-provider-aws/blob/main/names/caps.md)
178178
paths:
179179
include:
180-
- internal
180+
- "/internal"
181181
patterns:
182182
- pattern: var $NAME = ...
183183
- metavariable-pattern:
@@ -191,7 +191,7 @@ rules:
191191
message: Use correct caps in func name (i.e., HTTPS or https, not Https) (see list at https://github.com/hashicorp/terraform-provider-aws/blob/main/names/caps.md)
192192
paths:
193193
include:
194-
- internal
194+
- "/internal"
195195
patterns:
196196
- pattern: func $NAME( ... ) { ... }
197197
- metavariable-pattern:
@@ -206,7 +206,7 @@ rules:
206206
message: Use correct caps in const name (i.e., HTTPS or https, not Https) (see list at https://github.com/hashicorp/terraform-provider-aws/blob/main/names/caps.md)
207207
paths:
208208
include:
209-
- internal
209+
- "/internal"
210210
patterns:
211211
- pattern: const $NAME = ...
212212
- metavariable-pattern:
@@ -220,7 +220,7 @@ rules:
220220
message: Use correct caps in var name (i.e., HTTPS or https, not Https) (see list at https://github.com/hashicorp/terraform-provider-aws/blob/main/names/caps.md)
221221
paths:
222222
include:
223-
- internal
223+
- "/internal"
224224
patterns:
225225
- pattern: var $NAME = ...
226226
- metavariable-pattern:
@@ -234,7 +234,7 @@ rules:
234234
message: Use correct caps in func name (i.e., HTTPS or https, not Https) (see list at https://github.com/hashicorp/terraform-provider-aws/blob/main/names/caps.md)
235235
paths:
236236
include:
237-
- internal
237+
- "/internal"
238238
patterns:
239239
- pattern: func $NAME( ... ) { ... }
240240
- metavariable-pattern:
@@ -249,7 +249,7 @@ rules:
249249
message: Use correct caps in const name (i.e., HTTPS or https, not Https) (see list at https://github.com/hashicorp/terraform-provider-aws/blob/main/names/caps.md)
250250
paths:
251251
include:
252-
- internal
252+
- "/internal"
253253
patterns:
254254
- pattern: const $NAME = ...
255255
- metavariable-pattern:
@@ -263,7 +263,7 @@ rules:
263263
message: Use correct caps in var name (i.e., HTTPS or https, not Https) (see list at https://github.com/hashicorp/terraform-provider-aws/blob/main/names/caps.md)
264264
paths:
265265
include:
266-
- internal
266+
- "/internal"
267267
patterns:
268268
- pattern: var $NAME = ...
269269
- metavariable-pattern:
@@ -277,7 +277,7 @@ rules:
277277
message: Use correct caps in func name (i.e., HTTPS or https, not Https) (see list at https://github.com/hashicorp/terraform-provider-aws/blob/main/names/caps.md)
278278
paths:
279279
include:
280-
- internal
280+
- "/internal"
281281
patterns:
282282
- pattern: func $NAME( ... ) { ... }
283283
- metavariable-pattern:
@@ -292,7 +292,7 @@ rules:
292292
message: Use correct caps in const name (i.e., HTTPS or https, not Https) (see list at https://github.com/hashicorp/terraform-provider-aws/blob/main/names/caps.md)
293293
paths:
294294
include:
295-
- internal
295+
- "/internal"
296296
patterns:
297297
- pattern: const $NAME = ...
298298
- metavariable-pattern:
@@ -306,7 +306,7 @@ rules:
306306
message: Use correct caps in var name (i.e., HTTPS or https, not Https) (see list at https://github.com/hashicorp/terraform-provider-aws/blob/main/names/caps.md)
307307
paths:
308308
include:
309-
- internal
309+
- "/internal"
310310
patterns:
311311
- pattern: var $NAME = ...
312312
- metavariable-pattern:
@@ -320,7 +320,7 @@ rules:
320320
message: Do not use "EC2" in func name inside ec2 package
321321
paths:
322322
include:
323-
- internal/service/ec2
323+
- "/internal/service/ec2"
324324
patterns:
325325
- pattern: func $NAME( ... )
326326
- metavariable-pattern:
@@ -336,7 +336,7 @@ rules:
336336
message: Do not use "EC2" in const name inside ec2 package
337337
paths:
338338
include:
339-
- internal/service/ec2
339+
- "/internal/service/ec2"
340340
patterns:
341341
- pattern: const $NAME = ...
342342
- metavariable-pattern:
@@ -350,7 +350,7 @@ rules:
350350
message: Do not use "EC2" in var name inside ec2 package
351351
paths:
352352
include:
353-
- internal/service/ec2
353+
- "/internal/service/ec2"
354354
patterns:
355355
- pattern: var $NAME = ...
356356
- metavariable-pattern:

.ci/.semgrep-configs.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ rules:
66
message: "Config funcs should follow form testAcc<Resource>Config_<testDetail>"
77
paths:
88
include:
9-
- internal/service/**/*_test.go
9+
- "/internal/service/**/*_test.go"
1010
patterns:
1111
- pattern-inside: "[]resource.TestStep{ ... }"
1212
- pattern: "{..., $KEY:$VALUE, ...}"
@@ -28,7 +28,7 @@ rules:
2828
message: "Config funcs should follow form testAcc<Resource>Config_<testDetail>"
2929
paths:
3030
include:
31-
- internal/service/**/*_test.go
31+
- "/internal/service/**/*_test.go"
3232
patterns:
3333
- pattern-inside: "[]resource.TestStep{ ... }"
3434
- pattern: "{..., $KEY: acctest.ConfigCompose(..., $VALUE, ...), ...}"
@@ -49,7 +49,7 @@ rules:
4949
message: "Config funcs should not begin with 'testAccCheck'"
5050
paths:
5151
include:
52-
- internal/service/**/*_test.go
52+
- "/internal/service/**/*_test.go"
5353
patterns:
5454
- pattern-inside: "[]resource.TestStep{ ... }"
5555
- pattern: "{..., $KEY:$VALUE, ...}"
@@ -69,7 +69,7 @@ rules:
6969
message: "Config funcs should not begin with 'testAccCheck'"
7070
paths:
7171
include:
72-
- internal/service/**/*_test.go
72+
- "/internal/service/**/*_test.go"
7373
patterns:
7474
- pattern-inside: "[]resource.TestStep{ ... }"
7575
- pattern: "{..., $KEY: acctest.ConfigCompose(..., $VALUE, ...), ...}"

0 commit comments

Comments
 (0)