Skip to content

Commit 811e30b

Browse files
authored
chore: Fix spelling errors (#444)
Spell checking done using codespell. Correct spelling is a great way to look more professional and demonstrate higher quality. And it catches a surprisingly number of actual errors, too. Following up on aws-controllers-k8s/iam-controller#78 By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 06bf132 commit 811e30b

File tree

30 files changed

+67
-61
lines changed

30 files changed

+67
-61
lines changed

.codespellrc

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[codespell]
2+
skip = .codespellrc,./.git,./go.local.sum,./pkg/testdata
3+
ignore-words-list = specfield,uptodate,fpr
4+
check-filenames =
5+
check-hidden =
6+
quiet = 2

ATTRIBUTION.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ syntax/tree.go (from RegexTree.cs and RegexNode.cs): ported literally as possibl
9595

9696
syntax/writer.go (from RegexWriter.cs): ported literally with minor changes to make it more Go-ish.
9797

98-
match.go (from RegexMatch.cs): ported, simplified, and changed to handle Go's lack of inheritence.
98+
match.go (from RegexMatch.cs): ported, simplified, and changed to handle Go's lack of inheritance.
9999

100100
regexp.go (from Regex.cs and RegexOptions.cs): conceptually serves the same "starting point", but is simplified
101101
and changed to handle differences in C# strings and Go strings/runes.

pkg/config/resource.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ type SyncedConfig struct {
130130
When []SyncedCondition `json:"when"`
131131
}
132132

133-
// SyncedCondition represent one of the unique condition that should be fullfiled in
133+
// SyncedCondition represent one of the unique condition that should be fulfilled in
134134
// order to assert whether a resource is synced.
135135
type SyncedCondition struct {
136136
// Path of the field. e.g Status.Processing
@@ -343,7 +343,7 @@ type AdditionalColumnConfig struct {
343343
}
344344

345345
// PrintConfig informs instruct the code generator on how to sort kubebuilder
346-
// printcolumn marker coments.
346+
// printcolumn marker comments.
347347
type PrintConfig struct {
348348
// AddAgeColumn a boolean informing the code generator whether to append a kubebuilder
349349
// marker comment to show a resource Age (created since date) in `kubectl get` response.

pkg/generate/code/compare.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ func CompareResource(
250250

251251
// compareNil outputs Go code that compares two field values for nullability
252252
// and, if there is a nil difference, adds the difference to a variable
253-
// represeting the `ackcompare.Delta`
253+
// representing the `ackcompare.Delta`
254254
//
255255
// Output code will look something like this:
256256
//

pkg/metadata/generation_metadata.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ type GenerationMetadata struct {
6060
LastModification lastModificationInfo `json:"last_modification"`
6161
// AWS SDK Go version used generate the APIs
6262
AWSSDKGoVersion string `json:"aws_sdk_go_version"`
63-
// Informatiom about the ack-generate binary used to generate the APIs
63+
// Information about the ack-generate binary used to generate the APIs
6464
ACKGenerateInfo ackGenerateInfo `json:"ack_generate_info"`
6565
// Information about the generator config file used to generate the APIs
6666
GeneratorConfigInfo generatorConfigInfo `json:"generator_config_info"`

pkg/model/model_apigwv2_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ func TestAPIGatewayV2_Api(t *testing.T) {
7575
assert.NotNil(crd.SpecFields["Basepath"])
7676
assert.NotNil(crd.SpecFields["FailOnWarnings"])
7777

78-
// The required property should get overriden for Name and ProtocolType fields.
78+
// The required property should get overridden for Name and ProtocolType fields.
7979
assert.False(crd.SpecFields["Name"].IsRequired())
8080
assert.False(crd.SpecFields["ProtocolType"].IsRequired())
8181

pkg/model/multiversion/delta.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ func ComputeFieldDeltas(
110110
) ([]FieldDelta, error) {
111111
deltas := []FieldDelta{}
112112

113-
// collect field names and sort them to ensure a determenistic output order.
113+
// collect field names and sort them to ensure a deterministic output order.
114114
srcNames := []string{}
115115
for name := range srcFields {
116116
srcNames = append(srcNames, name)
@@ -134,7 +134,7 @@ func ComputeFieldDeltas(
134134
dstField, ok := dstFields[srcName]
135135
// If a field is found in both arrays only three changes are possible:
136136
// None, TypeChange and ChangeTypeShapeChangedToSecret.
137-
// NOTE(a-hilaly): carefull about X -> Y then Z -> X renames. It should
137+
// NOTE(a-hilaly): careful about X -> Y then Z -> X renames. It should
138138
// not be allowed.
139139
if ok {
140140
// mark field as visited.
@@ -188,7 +188,7 @@ func ComputeFieldDeltas(
188188
dstField, ok2 := dstFields[newName]
189189
if !ok2 {
190190
// if a field was renamed and we can't find it in dstNames, something
191-
// very wrong happend during CRD loading.
191+
// very wrong happened during CRD loading.
192192
return nil, fmt.Errorf("cannot find renamed field %s " + newName)
193193
}
194194

pkg/model/multiversion/delta_renames_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ func Test_computeRenames(t *testing.T) {
137137
return
138138
}
139139

140-
// Since 1.12 formating functions prints maps in key-sorted order.
140+
// Since 1.12 formatting functions prints maps in key-sorted order.
141141
// See https://golang.org/doc/go1.12#fmt
142142
if fmt.Sprintf("%v", got) != fmt.Sprintf("%v", tt.want) {
143143
t.Errorf("computeRenamesDelta() = %v, want %v", got, tt.want)

pkg/model/multiversion/manager.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ var (
3434
)
3535

3636
// APIVersionManager is a API versions manager. It contains the mapping
37-
// of each non-deprecated version with their correspending ackmodel.Model
37+
// of each non-deprecated version with their corresponding ackmodel.Model
3838
// and APIInfos.
3939
type APIVersionManager struct {
4040
gitRepo *git.Repository

pkg/model/op_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ func TestGetOpTypeAndResourceNameFromOpID(t *testing.T) {
121121
},
122122
}
123123
for _, test := range tests {
124-
ot, resName := model.GetOpTypeAndResourceNameFromOpID(test.opID, g.GetConfig())
125-
assert.Equal(test.expOpType, ot, test.opID)
124+
opType, resName := model.GetOpTypeAndResourceNameFromOpID(test.opID, g.GetConfig())
125+
assert.Equal(test.expOpType, opType, test.opID)
126126
assert.Equal(test.expResName, resName, test.opID)
127127
}
128128
}
@@ -154,8 +154,8 @@ func TestGetOpTypeAndResourceNameFromOpID_PluralSingular(t *testing.T) {
154154
},
155155
}
156156
for _, test := range tests {
157-
ot, resName := model.GetOpTypeAndResourceNameFromOpID(test.opID, g.GetConfig())
158-
assert.Equal(test.expOpType, ot, test.opID)
157+
opType, resName := model.GetOpTypeAndResourceNameFromOpID(test.opID, g.GetConfig())
158+
assert.Equal(test.expOpType, opType, test.opID)
159159
assert.Equal(test.expResName, resName, test.opID)
160160
}
161161
}

pkg/model/sdk_api.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ func (a *SDKAPI) GetOperationMap(cfg *ackgenconfig.Config) *OperationMap {
105105
if !found {
106106
panic("operation " + opID + " in generator.yaml 'operations:' object does not exist.")
107107
}
108-
for _, ot := range opCfg.OperationType {
109-
opType := OpTypeFromString(ot)
108+
for _, operationType := range opCfg.OperationType {
109+
opType := OpTypeFromString(operationType)
110110
opMap[opType][opCfg.ResourceName] = op
111111
}
112112
}

pkg/testdata/models/apis/codedeploy/0000-00-00/api-2.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1691,7 +1691,7 @@
16911691
"ECSTaskSet":{
16921692
"type":"structure",
16931693
"members":{
1694-
"identifer":{"shape":"ECSTaskSetIdentifier"},
1694+
"identifier":{"shape":"ECSTaskSetIdentifier"},
16951695
"desiredCount":{"shape":"ECSTaskSetCount"},
16961696
"pendingCount":{"shape":"ECSTaskSetCount"},
16971697
"runningCount":{"shape":"ECSTaskSetCount"},

pkg/testdata/models/apis/codedeploy/0000-00-00/docs-2.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"SkipWaitTimeForInstanceTermination": "<p>In a blue/green deployment, overrides any specified wait time and starts terminating instances immediately after the traffic routing is complete.</p>",
4646
"StopDeployment": "<p>Attempts to stop an ongoing deployment.</p>",
4747
"TagResource": "<p> Associates the list of tags in the input <code>Tags</code> parameter with the resource identified by the <code>ResourceArn</code> input parameter. </p>",
48-
"UntagResource": "<p> Disassociates a resource from a list of tags. The resource is identified by the <code>ResourceArn</code> input parameter. The tags are identfied by the list of keys in the <code>TagKeys</code> input parameter. </p>",
48+
"UntagResource": "<p> Disassociates a resource from a list of tags. The resource is identified by the <code>ResourceArn</code> input parameter. The tags are identified by the list of keys in the <code>TagKeys</code> input parameter. </p>",
4949
"UpdateApplication": "<p>Changes the name of an application.</p>",
5050
"UpdateDeploymentGroup": "<p>Changes information about a deployment group.</p>"
5151
},
@@ -185,7 +185,7 @@
185185
"refs": {
186186
"ListTagsForResourceInput$ResourceArn": "<p> The ARN of a CodeDeploy resource. <code>ListTagsForResource</code> returns all the tags associated with the resource that is identified by the <code>ResourceArn</code>. </p>",
187187
"TagResourceInput$ResourceArn": "<p> The ARN of a resource, such as a CodeDeploy application or deployment group. </p>",
188-
"UntagResourceInput$ResourceArn": "<p> The ARN that specifies from which resource to disassociate the tags with the keys in the <code>TagKeys</code> input paramter. </p>"
188+
"UntagResourceInput$ResourceArn": "<p> The ARN that specifies from which resource to disassociate the tags with the keys in the <code>TagKeys</code> input parameter. </p>"
189189
}
190190
},
191191
"ArnNotSupportedException": {
@@ -710,7 +710,7 @@
710710
"base": "<p> Information about the deployment target. </p>",
711711
"refs": {
712712
"DeploymentTargetList$member": null,
713-
"GetDeploymentTargetOutput$deploymentTarget": "<p> A deployment target that contains information about a deployment such as its status, lifecyle events, and when it was last updated. It also contains metadata about the deployment target. The deployment target metadata depends on the deployment target's type (<code>instanceTarget</code>, <code>lambdaTarget</code>, or <code>ecsTarget</code>). </p>"
713+
"GetDeploymentTargetOutput$deploymentTarget": "<p> A deployment target that contains information about a deployment such as its status, lifecycle events, and when it was last updated. It also contains metadata about the deployment target. The deployment target metadata depends on the deployment target's type (<code>instanceTarget</code>, <code>lambdaTarget</code>, or <code>ecsTarget</code>). </p>"
714714
}
715715
},
716716
"DeploymentTargetDoesNotExistException": {
@@ -889,7 +889,7 @@
889889
"ECSTaskSetIdentifier": {
890890
"base": null,
891891
"refs": {
892-
"ECSTaskSet$identifer": "<p> A unique ID of an <code>ECSTaskSet</code>. </p>"
892+
"ECSTaskSet$identifier": "<p> A unique ID of an <code>ECSTaskSet</code>. </p>"
893893
}
894894
},
895895
"ECSTaskSetList": {

pkg/testdata/models/apis/dynamodb/0000-00-00/generator.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ resources:
1919
- 0
2020
operations:
2121
DescribeBackup:
22-
# DescribeBackupOutput is an unsual shape because it contains information for
22+
# DescribeBackupOutput is an unusual shape because it contains information for
2323
# the backup it self (BackupDetails), the table details when the backup was
2424
# created (SourceTableDetails) and the table features (SourceTableFeatureDetails).
2525
# If not specified the code generator will try to determine the wrapper field by

0 commit comments

Comments
 (0)