22# "SPDX-License-Identifier: MPL-2.0"
33
44rules :
5- - id : quicksight- schema-string-len-between-required
5+ - id : schema-string-arn-requried
66 languages : [go]
7- message : String attributes with length validation should use stringLenBetweenSchema
7+ message : ARN String attributes should use sdkschema.ArnStringSchema
8+ paths :
9+ include :
10+ - " /internal/service/quicksight/schema"
11+ patterns :
12+ - pattern-inside : " Schema: map[string]*schema.Schema{ ... }"
13+ - pattern : |
14+ {
15+ Type: schema.TypeString,
16+ Required: true,
17+ ValidateFunc: verify.ValidARN,
18+ }
19+ fix : sdkschema.ARNStringSchema(sdkschema.AttrRequired)
20+ severity : WARNING
21+
22+ - id : schema-string-arn-optional
23+ languages : [go]
24+ message : ARN String attributes should use sdkschema.ArnStringSchema
25+ paths :
26+ include :
27+ - " /internal/service/quicksight/schema"
28+ patterns :
29+ - pattern-inside : " Schema: map[string]*schema.Schema{ ... }"
30+ - pattern : |
31+ {
32+ Type: schema.TypeString,
33+ Optional: true,
34+ ValidateFunc: verify.ValidARN,
35+ }
36+ fix : sdkschema.ARNStringSchema(sdkschema.AttrOptional)
37+ severity : WARNING
38+
39+ - id : schema-string-len-between-required
40+ languages : [go]
41+ message : String attributes with length validation should use sdkschema.StringLenBetweenSchema
842 paths :
943 include :
1044 - " /internal/service/quicksight/schema"
@@ -16,12 +50,12 @@ rules:
1650 Required: true,
1751 ValidateFunc: validation.StringLenBetween($MIN, $MAX),
1852 }
19- fix : stringLenBetweenSchema(attrRequired , $MIN, $MAX)
53+ fix : sdkschema.StringLenBetweenSchema(sdkschema.AttrRequired , $MIN, $MAX)
2054 severity : WARNING
2155
22- - id : quicksight- schema-string-len-between-optional
56+ - id : schema-string-len-between-optional
2357 languages : [go]
24- message : String attributes with length validation should use stringLenBetweenSchema
58+ message : String attributes with length validation should use sdkschema.StringLenBetweenSchema
2559 paths :
2660 include :
2761 - " /internal/service/quicksight/schema"
@@ -33,12 +67,12 @@ rules:
3367 Optional: true,
3468 ValidateFunc: validation.StringLenBetween($MIN, $MAX),
3569 }
36- fix : stringLenBetweenSchema(attrOptional , $MIN, $MAX)
70+ fix : sdkschema.StringLenBetweenSchema(sdkschema.AttrOptional , $MIN, $MAX)
3771 severity : WARNING
3872
39- - id : quicksight- schema-string-len-between-optionalcomputed
73+ - id : schema-string-len-between-optionalcomputed
4074 languages : [go]
41- message : String attributes with length validation should use stringLenBetweenSchema
75+ message : String attributes with length validation should use sdkschema.StringLenBetweenSchema
4276 paths :
4377 include :
4478 - " /internal/service/quicksight/schema"
@@ -59,12 +93,12 @@ rules:
5993 Optional: true,
6094 ValidateFunc: validation.StringLenBetween($MIN, $MAX),
6195 }
62- fix : stringLenBetweenSchema(attrOptionalComputed , $MIN, $MAX)
96+ fix : sdkschema.StringLenBetweenSchema(sdkschema.AttrOptionalComputed , $MIN, $MAX)
6397 severity : WARNING
6498
65- - id : quicksight- schema-string-enum
99+ - id : schema-string-enum
66100 languages : [go]
67- message : String attributes with enum validation should use stringEnumSchema [<type>](<required>)
101+ message : String attributes with enum validation should use sdkschema.StringEnumSchema [<type>](<required>)
68102 paths :
69103 include :
70104 - " /internal/service/quicksight/schema"
@@ -100,9 +134,9 @@ rules:
100134 # Cannot be auto-fixed
101135 severity : WARNING
102136
103- - id : quicksight- schema-int-between-required
137+ - id : schema-int-between-required
104138 languages : [go]
105- message : Int attributes with between validation should use intBetweenSchema
139+ message : Int attributes with between validation should use sdkschema.IntBetweenSchema
106140 paths :
107141 include :
108142 - " /internal/service/quicksight/schema"
@@ -114,12 +148,12 @@ rules:
114148 Required: true,
115149 ValidateFunc: validation.IntBetween($MIN, $MAX),
116150 }
117- fix : intBetweenSchema(attrRequired , $MIN, $MAX)
151+ fix : sdkschema.IntBetweenSchema(sdkschema.AttrRequired , $MIN, $MAX)
118152 severity : WARNING
119153
120- - id : quicksight- schema-int-between-optional
154+ - id : schema-int-between-optional
121155 languages : [go]
122- message : Int attributes with between validation should use intBetweenSchema
156+ message : Int attributes with between validation should use sdkschema.IntBetweenSchema
123157 paths :
124158 include :
125159 - " /internal/service/quicksight/schema"
@@ -131,12 +165,12 @@ rules:
131165 Optional: true,
132166 ValidateFunc: validation.IntBetween($MIN, $MAX),
133167 }
134- fix : intBetweenSchema(attrOptional , $MIN, $MAX)
168+ fix : sdkschema.IntBetweenSchema(sdkschema.AttrOptional , $MIN, $MAX)
135169 severity : WARNING
136170
137- - id : quicksight- schema-float-between-required
171+ - id : schema-float-between-required
138172 languages : [go]
139- message : Float attributes with between validation should use floatBetweenSchema
173+ message : Float attributes with between validation should use sdkschema.FloatBetweenSchema
140174 paths :
141175 include :
142176 - " /internal/service/quicksight/schema"
@@ -148,12 +182,12 @@ rules:
148182 Required: true,
149183 ValidateFunc: validation.FloatBetween($MIN, $MAX),
150184 }
151- fix : floatBetweenSchema(attrRequired , $MIN, $MAX)
185+ fix : sdkschema.FloatBetweenSchema(sdkschema.AttrRequired , $MIN, $MAX)
152186 severity : WARNING
153187
154- - id : quicksight- schema-float-between-optional
188+ - id : schema-float-between-optional
155189 languages : [go]
156- message : Float attributes with between validation should use floatBetweenSchema
190+ message : Float attributes with between validation should use sdkschema.FloatBetweenSchema
157191 paths :
158192 include :
159193 - " /internal/service/quicksight/schema"
@@ -165,12 +199,12 @@ rules:
165199 Optional: true,
166200 ValidateFunc: validation.FloatBetween($MIN, $MAX),
167201 }
168- fix : floatBetweenSchema(attrOptional , $MIN, $MAX)
202+ fix : sdkschema.FloatBetweenSchema(sdkschema.AttrOptional , $MIN, $MAX)
169203 severity : WARNING
170204
171- - id : quicksight- schema-string-computed-only
205+ - id : schema-string-computed-only
172206 languages : [go]
173- message : Computed-Only String attributes should use stringComputedOnly
207+ message : Computed-Only String attributes should use sdkschema.StringComputedOnly
174208 paths :
175209 include :
176210 - " /internal/service/quicksight/schema"
@@ -184,9 +218,9 @@ rules:
184218 fix : stringComputedOnly()
185219 severity : WARNING
186220
187- - id : quicksight- schema-bool-computed-only
221+ - id : schema-bool-computed-only
188222 languages : [go]
189- message : Computed-Only Bool attributes should use boolComputedOnly
223+ message : Computed-Only Bool attributes should use sdkschema.BoolComputedOnly
190224 paths :
191225 include :
192226 - " /internal/service/quicksight/schema"
@@ -197,12 +231,12 @@ rules:
197231 Type: schema.TypeBool,
198232 Computed: true,
199233 }
200- fix : boolComputedOnly ()
234+ fix : sdkschema.BoolComputedOnly ()
201235 severity : WARNING
202236
203- - id : quicksight- schema-int-computed-only
237+ - id : schema-int-computed-only
204238 languages : [go]
205- message : Computed-Only Int attributes should use intComputedOnly
239+ message : Computed-Only Int attributes should use sdkschema.IntComputedOnly
206240 paths :
207241 include :
208242 - " /internal/service/quicksight/schema"
@@ -216,9 +250,9 @@ rules:
216250 fix : intComputedOnly()
217251 severity : WARNING
218252
219- - id : quicksight- schema-float-computed-only
253+ - id : schema-float-computed-only
220254 languages : [go]
221- message : Computed-Only Float attributes should use floatComputedOnly
255+ message : Computed-Only Float attributes should use sdkschema.FloatComputedOnly
222256 paths :
223257 include :
224258 - " /internal/service/quicksight/schema"
@@ -229,5 +263,5 @@ rules:
229263 Type: schema.TypeFloat,
230264 Computed: true,
231265 }
232- fix : floatComputedOnly ()
266+ fix : sdkschema.FloatComputedOnly ()
233267 severity : WARNING
0 commit comments