Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[codespell]
skip = .codespellrc,./.git,./go.local.sum,./pkg/testdata
ignore-words-list = specfield,uptodate,fpr
check-filenames =
check-hidden =
quiet = 2
2 changes: 1 addition & 1 deletion ATTRIBUTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ syntax/tree.go (from RegexTree.cs and RegexNode.cs): ported literally as possibl

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

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

regexp.go (from Regex.cs and RegexOptions.cs): conceptually serves the same "starting point", but is simplified
and changed to handle differences in C# strings and Go strings/runes.
Expand Down
4 changes: 2 additions & 2 deletions pkg/config/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ type SyncedConfig struct {
When []SyncedCondition `json:"when"`
}

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

// PrintConfig informs instruct the code generator on how to sort kubebuilder
// printcolumn marker coments.
// printcolumn marker comments.
type PrintConfig struct {
// AddAgeColumn a boolean informing the code generator whether to append a kubebuilder
// marker comment to show a resource Age (created since date) in `kubectl get` response.
Expand Down
2 changes: 1 addition & 1 deletion pkg/generate/code/compare.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ func CompareResource(

// compareNil outputs Go code that compares two field values for nullability
// and, if there is a nil difference, adds the difference to a variable
// represeting the `ackcompare.Delta`
// representing the `ackcompare.Delta`
//
// Output code will look something like this:
//
Expand Down
2 changes: 1 addition & 1 deletion pkg/metadata/generation_metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ type GenerationMetadata struct {
LastModification lastModificationInfo `json:"last_modification"`
// AWS SDK Go version used generate the APIs
AWSSDKGoVersion string `json:"aws_sdk_go_version"`
// Informatiom about the ack-generate binary used to generate the APIs
// Information about the ack-generate binary used to generate the APIs
ACKGenerateInfo ackGenerateInfo `json:"ack_generate_info"`
// Information about the generator config file used to generate the APIs
GeneratorConfigInfo generatorConfigInfo `json:"generator_config_info"`
Expand Down
2 changes: 1 addition & 1 deletion pkg/model/model_apigwv2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func TestAPIGatewayV2_Api(t *testing.T) {
assert.NotNil(crd.SpecFields["Basepath"])
assert.NotNil(crd.SpecFields["FailOnWarnings"])

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

Expand Down
6 changes: 3 additions & 3 deletions pkg/model/multiversion/delta.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func ComputeFieldDeltas(
) ([]FieldDelta, error) {
deltas := []FieldDelta{}

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

Expand Down
2 changes: 1 addition & 1 deletion pkg/model/multiversion/delta_renames_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func Test_computeRenames(t *testing.T) {
return
}

// Since 1.12 formating functions prints maps in key-sorted order.
// Since 1.12 formatting functions prints maps in key-sorted order.
// See https://golang.org/doc/go1.12#fmt
if fmt.Sprintf("%v", got) != fmt.Sprintf("%v", tt.want) {
t.Errorf("computeRenamesDelta() = %v, want %v", got, tt.want)
Expand Down
2 changes: 1 addition & 1 deletion pkg/model/multiversion/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ var (
)

// APIVersionManager is a API versions manager. It contains the mapping
// of each non-deprecated version with their correspending ackmodel.Model
// of each non-deprecated version with their corresponding ackmodel.Model
// and APIInfos.
type APIVersionManager struct {
gitRepo *git.Repository
Expand Down
8 changes: 4 additions & 4 deletions pkg/model/op_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ func TestGetOpTypeAndResourceNameFromOpID(t *testing.T) {
},
}
for _, test := range tests {
ot, resName := model.GetOpTypeAndResourceNameFromOpID(test.opID, g.GetConfig())
assert.Equal(test.expOpType, ot, test.opID)
opType, resName := model.GetOpTypeAndResourceNameFromOpID(test.opID, g.GetConfig())
assert.Equal(test.expOpType, opType, test.opID)
assert.Equal(test.expResName, resName, test.opID)
}
}
Expand Down Expand Up @@ -154,8 +154,8 @@ func TestGetOpTypeAndResourceNameFromOpID_PluralSingular(t *testing.T) {
},
}
for _, test := range tests {
ot, resName := model.GetOpTypeAndResourceNameFromOpID(test.opID, g.GetConfig())
assert.Equal(test.expOpType, ot, test.opID)
opType, resName := model.GetOpTypeAndResourceNameFromOpID(test.opID, g.GetConfig())
assert.Equal(test.expOpType, opType, test.opID)
assert.Equal(test.expResName, resName, test.opID)
}
}
4 changes: 2 additions & 2 deletions pkg/model/sdk_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ func (a *SDKAPI) GetOperationMap(cfg *ackgenconfig.Config) *OperationMap {
if !found {
panic("operation " + opID + " in generator.yaml 'operations:' object does not exist.")
}
for _, ot := range opCfg.OperationType {
opType := OpTypeFromString(ot)
for _, operationType := range opCfg.OperationType {
opType := OpTypeFromString(operationType)
opMap[opType][opCfg.ResourceName] = op
}
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/testdata/models/apis/codedeploy/0000-00-00/api-2.json
Original file line number Diff line number Diff line change
Expand Up @@ -1691,7 +1691,7 @@
"ECSTaskSet":{
"type":"structure",
"members":{
"identifer":{"shape":"ECSTaskSetIdentifier"},
"identifier":{"shape":"ECSTaskSetIdentifier"},
"desiredCount":{"shape":"ECSTaskSetCount"},
"pendingCount":{"shape":"ECSTaskSetCount"},
"runningCount":{"shape":"ECSTaskSetCount"},
Expand Down
8 changes: 4 additions & 4 deletions pkg/testdata/models/apis/codedeploy/0000-00-00/docs-2.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"SkipWaitTimeForInstanceTermination": "<p>In a blue/green deployment, overrides any specified wait time and starts terminating instances immediately after the traffic routing is complete.</p>",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you're actually finding spelling mistakes in official AWS models. Sounds like we need this tool to run internally, too. 😆

"StopDeployment": "<p>Attempts to stop an ongoing deployment.</p>",
"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>",
"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>",
"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>",
"UpdateApplication": "<p>Changes the name of an application.</p>",
"UpdateDeploymentGroup": "<p>Changes information about a deployment group.</p>"
},
Expand Down Expand Up @@ -185,7 +185,7 @@
"refs": {
"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>",
"TagResourceInput$ResourceArn": "<p> The ARN of a resource, such as a CodeDeploy application or deployment group. </p>",
"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>"
"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>"
}
},
"ArnNotSupportedException": {
Expand Down Expand Up @@ -710,7 +710,7 @@
"base": "<p> Information about the deployment target. </p>",
"refs": {
"DeploymentTargetList$member": null,
"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>"
"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>"
}
},
"DeploymentTargetDoesNotExistException": {
Expand Down Expand Up @@ -889,7 +889,7 @@
"ECSTaskSetIdentifier": {
"base": null,
"refs": {
"ECSTaskSet$identifer": "<p> A unique ID of an <code>ECSTaskSet</code>. </p>"
"ECSTaskSet$identifier": "<p> A unique ID of an <code>ECSTaskSet</code>. </p>"
}
},
"ECSTaskSetList": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ resources:
- 0
operations:
DescribeBackup:
# DescribeBackupOutput is an unsual shape because it contains information for
# DescribeBackupOutput is an unusual shape because it contains information for
# the backup it self (BackupDetails), the table details when the backup was
# created (SourceTableDetails) and the table features (SourceTableFeatureDetails).
# If not specified the code generator will try to determine the wrapper field by
Expand Down
Loading