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

Lines changed: 6 additions & 0 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 3 additions & 3 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 4 additions & 4 deletions
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
}

0 commit comments

Comments
 (0)