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

Add typo check #1314

Merged
merged 2 commits into from
Feb 9, 2025
Merged

Conversation

mowangdk
Copy link
Contributor

@mowangdk mowangdk commented Feb 5, 2025

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Add typo check in github action

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?


Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Feb 5, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mowangdk

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Feb 5, 2025
@mowangdk mowangdk force-pushed the features/add_typos_check branch from c9444fa to 0f4c720 Compare February 5, 2025 03:45
@huww98
Copy link
Contributor

huww98 commented Feb 5, 2025

How about using golangci-lint? It is also used by Kubernetes.

@mowangdk
Copy link
Contributor Author

mowangdk commented Feb 5, 2025

How about using golangci-lint? It is also used by Kubernetes.

I've found that golint-ci is limited in the number of errors it can scan, and I scan the kubernetes repository for a lot of issues using typos. for example:

error: `Permssion` should be `Permission`
  --> ./pkg/volume/volume_linux_test.go:87:8
   |
87 |    skipPermssion:       false,
   |        ^^^^^^^^^

@huww98
Copy link
Contributor

huww98 commented Feb 5, 2025

OK, golangci-lint seems using a hard coded dictionary that records both correct and incorrect word, and it is not updated https://github.com/golangci/misspell/blob/master/words.go

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 5, 2025
@mowangdk mowangdk force-pushed the features/add_typos_check branch 6 times, most recently from 4de6e6e to 7ea7c79 Compare February 5, 2025 11:58
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 5, 2025
@mowangdk
Copy link
Contributor Author

mowangdk commented Feb 5, 2025

/retest

@mowangdk mowangdk force-pushed the features/add_typos_check branch from 7ea7c79 to 1ad60a0 Compare February 5, 2025 12:00
@mowangdk mowangdk force-pushed the features/add_typos_check branch from 1ad60a0 to fc54ebf Compare February 5, 2025 12:08
_typos.toml Outdated Show resolved Hide resolved
.github/workflows/typos.yaml Outdated Show resolved Hide resolved
pkg/disk/disk.go Outdated Show resolved Hide resolved
@mowangdk mowangdk force-pushed the features/add_typos_check branch from fc54ebf to 2d54d89 Compare February 9, 2025 09:01
@mowangdk
Copy link
Contributor Author

mowangdk commented Feb 9, 2025

DISK_TAGED_BY_PLUGIN typo haven't been detected, config file configuration must be present

@mowangdk mowangdk force-pushed the features/add_typos_check branch 2 times, most recently from cd73d87 to 907b069 Compare February 9, 2025 09:14
@mowangdk mowangdk force-pushed the features/add_typos_check branch from 907b069 to 363978d Compare February 9, 2025 09:16
@mowangdk mowangdk merged commit 3f5ab1a into kubernetes-sigs:master Feb 9, 2025
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants