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, brands and acronyms #21

Merged
merged 2 commits into from
Apr 2, 2024
Merged

Conversation

ccoVeille
Copy link
Contributor

  • fix typos in code, test and documentation
  • Fix registered trademark and other acronyms

@xhd2015
Copy link
Owner

xhd2015 commented Apr 2, 2024

Hi @ccoVeille I have moved some functions from cmd/xgo/patch.go to other few files, the resulting conflicts have been resolved. But these typos are now in other files(cmd/xgo/patch_*.go), you may check these file and apply the typo fix and commit again.

Once done, I will merge this PR into master, thanks!

@ccoVeille
Copy link
Contributor Author

No problem. I'll when I have a minute later today.

@ccoVeille
Copy link
Contributor Author

It should be OK now.

@ccoVeille
Copy link
Contributor Author

I recommend using simple tools from time to time, such as

https://github.com/crate-ci/typos
https://github.com/codespell-project/codespell

More information about them in an old article I made on dev.to

https://dev.to/ccoveille/how-to-fix-typos-in-your-code-for-goods--3c7

@xhd2015
Copy link
Owner

xhd2015 commented Apr 2, 2024

https://dev.to/ccoveille/how-to-fix-typos-in-your-code-for-goods--3c7

Great, I'll integrate them into the git hooks

@xhd2015 xhd2015 merged commit 6150ddb into xhd2015:master Apr 2, 2024
1 check passed
@ccoVeille ccoVeille deleted the fix-typos branch April 2, 2024 09:03
@ccoVeille
Copy link
Contributor Author

https://dev.to/ccoveille/how-to-fix-typos-in-your-code-for-goods--3c7

Great, I'll integrate them into the git hooks

I would say this one is the simplest to use

https://github.com/marketplace/actions/typos-action

@xhd2015
Copy link
Owner

xhd2015 commented Apr 2, 2024

https://dev.to/ccoveille/how-to-fix-typos-in-your-code-for-goods--3c7

Great, I'll integrate them into the git hooks

I would say this one is the simplest to use

https://github.com/marketplace/actions/typos-action

How do you handle false positives? Like these: https://github.com/xhd2015/xgo/actions/runs/8520319809/job/23336201289?pr=24

I'd like nd ,lits to remain unchanged

Warning: "hae" should be "have".
Warning: "nd" should be "and".
Warning: "ue" should be "use" or "due".
Warning: "nd" should be "and".
Warning: "ue" should be "use" or "due".
Warning: "Lits" should be "List".
Warning: "lits" should be "list".
Warning: "lits" should be "list".
Warning: "lits" should be "list".
Warning: "lits" should be "list".
Warning: "Lits" should be "List".
error: `hae` should be `have`
  --> ./cmd/xgo/patch_compiler.go:166:34
    |
166 |     // go1.19 and under does not hae PGO
    |                                  ^^^
    |
error: `nd` should be `and`
  --> ./patch/debug.go:180:3
    |
180 |   nd := fn.Body[0]

@ccoVeille
Copy link
Contributor Author

https://github.com/marketplace/actions/typos-action#false-positives

add a _typos.toml

[default]
extend-ignore-identifiers-re = [
    "[Ll]its", # Lits is a valid concept here
    "nd",     # short variable I would like to use
]

@ccoVeille
Copy link
Contributor Author

The file can be named .typos.toml also

https://github.com/crate-ci/typos/blob/master/docs/reference.md

@xhd2015
Copy link
Owner

xhd2015 commented Apr 2, 2024

Thanks, learned a lot

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.

2 participants