Skip to content

Commit

Permalink
Add Spell Checking in CI (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
majst01 authored Jan 10, 2025
1 parent b4ba1c9 commit 0995543
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ jobs:

- name: Run Linter
uses: golangci/golangci-lint-action@v6

- name: Check spelling
uses: crate-ci/typos@master
16 changes: 16 additions & 0 deletions _typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[default]
extend-ignore-re = [
# This enables # spellchecker:disable-line
"(?Rm)^.*(#|//)\\s*spellchecker:disable-line$",
# This enables # spellchecker:off/on
"(?s)(#|//)\\s*spellchecker:off.*?\\n\\s*(#|//)\\s*spellchecker:on",
]

[default.extend-words]


[files]
extend-exclude = [
"go.mod",
"go.sum",
]
2 changes: 1 addition & 1 deletion internal/controller/metalstackcluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func (r *MetalStackClusterReconciler) Reconcile(ctx context.Context, req ctrl.Re
if statusErr != nil {
err = errors.Join(err, fmt.Errorf("unable to update status: %w", statusErr))
} else if !reconciler.infraCluster.Status.Ready {
err = errors.New("cluster is not yet ready, requeueing")
err = errors.New("cluster is not yet ready, requeuing")
}
}()

Expand Down
2 changes: 1 addition & 1 deletion internal/controller/metalstackmachine_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func (r *MetalStackMachineReconciler) Reconcile(ctx context.Context, req ctrl.Re
if statusErr != nil {
err = errors.Join(err, fmt.Errorf("unable to update status: %w", statusErr))
} else if !reconciler.infraMachine.Status.Ready {
err = errors.New("machine is not yet ready, requeueing")
err = errors.New("machine is not yet ready, requeuing")
}
}()

Expand Down

0 comments on commit 0995543

Please sign in to comment.