Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix typos using https://crates.io/crates/typos-cli #112

Merged
merged 1 commit into from
Jan 26, 2024

Conversation

Takashiidobe
Copy link
Contributor

Fixes #

Description

This PR uses https://crates.io/crates/typos-cli in order to fix some typos in docs and go code. The config file I used was:

[default.extend-words]
# karpenter-provider-azure
als = "als"
ERRO = "ERRO"

If you'd like to use it in the future.

There was one extra typo that I found, but I believe it's an imported module, so the typo would need to be fixed there for it to apply:

diff --git a/pkg/apis/v1alpha2/labels.go b/pkg/apis/v1alpha2/labels.go
index 6b55f4b..2aee2ce 100644
--- a/pkg/apis/v1alpha2/labels.go
+++ b/pkg/apis/v1alpha2/labels.go
@@ -68,7 +68,7 @@ var (
 		LabelSKUHyperVGeneration,
 	)
 
-	AllowUndefinedLabels = func(options scheduling.CompatabilityOptions) scheduling.CompatabilityOptions {
+	AllowUndefinedLabels = func(options scheduling.CompatibilityOptions) scheduling.CompatibilityOptions {
 		options.AllowUndefined = corev1beta1.WellKnownLabels.Union(RestrictedLabels)
 		return options
 	}

As such, I have excluded it from this PR.

How was this change tested?

  • It wasn't tested.

Does this change impact docs?

  • Yes, PR includes docs updates
  • Yes, issue opened: #
  • No

Release Note

NONE

@Takashiidobe
Copy link
Contributor Author

@microsoft-github-policy-service agree

@Bryce-Soghigian
Copy link
Collaborator

@Takashiidobe thanks for contributing, if we are going down this path it might make sense to add some sort of spellcheck linter to properly check these types of things.

@Takashiidobe
Copy link
Contributor Author

Sure, this crate also provides instructions on how to set up a github action to check spelling in ci: https://github.com/crate-ci/typos/blob/master/docs/github-action.md

It could be set up to run on PRs with the config file i provided, but if a new word is added that the cli doesn't understand then it will block the pr unless that word is added as an exception in the typos config file, which can be cumbersome. If you'd like to use it as a diagnostic, It could be added as a non blocking ci job too.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 7662960510

  • 0 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 97.626%

Totals Coverage Status
Change from base Build 7661442501: 0.0%
Covered Lines: 35605
Relevant Lines: 36471

💛 - Coveralls

@tallaxes
Copy link
Collaborator

tallaxes commented Jan 26, 2024

Or pre-commit? #113

@tallaxes tallaxes merged commit a7a58e2 into Azure:main Jan 26, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants