-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
style: fix typos #1996
style: fix typos #1996
Conversation
flag_test.go
Outdated
ser0 := sl0.Serialize() | ||
set0 := sl0.Serialize() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this is incorrect.
flag.go
Outdated
pn := prefixedNames(f.Names(), placeholder) | ||
on := prefixedNames(f.Names(), placeholder) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this is incorrect.
Maybe we should exclude *.go.
ec5789c
to
69376ac
Compare
I excluded *.go. typos -w --exclude '**/*.go' |
test-docs failed. https://github.com/urfave/cli/actions/runs/11535764321/job/32111183783?pr=1996
|
69376ac
to
522951e
Compare
📝 Lines 550 to 555 in 94107c2
https://github.com/urfave/gfmrun/releases We need to build gfmrun for darwin/arm64 or use the asset for darwin/amd64. |
😁 You can now install gfmrun using aqua, which is a modern CLI version manager. |
I could reproduce the issue. $ gfmrun --sources docs/v3/examples/combining-short-options.md
INFO[0000] loading languages=/Users/shunsukesuzuki/.cache/gfmrun/languages.yml
INFO[0000] start i=1/1 lang=go line=23 source=docs/v3/examples/combining-short-options.md
go: creating new go.mod: module gfmrun/example23
go: to add module requirements and sums:
go mod tidy
go: finding module for package github.com/urfave/cli/v3
go: found github.com/urfave/cli/v3 in github.com/urfave/cli/v3 v3.0.0-alpha9.1
INFO[0002] finish fields.time=2.041508375s i=1/1 lang=go line=23 source=docs/v3/examples/combining-short-options.md
INFO[0002] checked fields.time=2.04220175s source=docs/v3/examples/combining-short-options.md
INFO[0002] done error_count=1 example_count=1 fields.time=2.04255s source_count=1
ERRO[0002] expected output does not match actual: "serve: true\noption: true\nmessage: Some message\n" != "" |
@@ -63,7 +63,7 @@ and `-m` respectively, setting `UseShortOptionHandling` will also support the | |||
following syntax: | |||
|
|||
``` | |||
$ cmd -som "Some message" | |||
$ cmd -some "Some message" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I see. som
isn't typo.
2767cc4
to
e6a6b9f
Compare
@@ -93,9 +93,9 @@ import ( | |||
|
|||
func main() { | |||
cli.HelpFlag = cli.BoolFlag{ | |||
Name: "halp, haaaaalp", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, this isn't typo in this context.
```sh typos -w ```
1d21c59
to
83b17d4
Compare
📝 $ typos
error: `Thar` should be `Than`, `That`
--> ./docs/v3/examples/full-api-example.md:165:36
|
165 | fmt.Fprintf(cmd.Root().Writer, "Thar be no %q here.\n", command)
| ^^^^
|
error: `ba` should be `by`, `be`
--> ./suggestions_test.go:26:11
|
26 | {"aa", "ba", 0.6666666666666666},
| ^^
|
error: `ba` should be `by`, `be`
--> ./suggestions_test.go:27:5
|
27 | {"ba", "aa", 0.6666666666666666},
| ^^
|
error: `hel` should be `help`, `hell`, `heal`
--> ./suggestions_test.go:77:9
|
77 | {"", "hel", "--help"},
| ^^^
|
error: `Thar` should be `Than`, `That`
--> ./docs/v2/examples/full-api-example.md:174:34
|
174 | fmt.Fprintf(cCtx.App.Writer, "Thar be no %q here.\n", command)
| ^^^^
|
error: `ist` should be `is`, `it`, `its`, `sit`, `list`
--> ./docs/v1/examples/flags.md:441:23
|
441 | fmt.Println("yaml ist rad")
| ^^^
|
error: `Thar` should be `Than`, `That`
--> ./docs/v1/examples/version-flag.md:249:32
|
249 | fmt.Fprintf(c.App.Writer, "Thar be no %q here.\n", command)
| ^^^^
| |
_typos.toml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are adding this file, should we also consider adding crate-ci/typos
into our CI? https://github.com/crate-ci/typos/blob/master/docs/github-action.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer a Go based tool that doesn't requires additional files.
Or the spellcheck that is completely configured from GitHub Action.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are adding this file, should we also consider adding crate-ci/typos into our CI?
Yeah, I agree. Or if we don't want to add this file, I'll simply remove it.
I would prefer a Go based tool that doesn't requires additional files.
For instance?
Or the spellcheck that is completely configured from GitHub Action.
This one?
https://github.com/marketplace/actions/github-spellcheck-action
I prefer a tool we can run both local and CI.
I like typos as it is built with Go and support auto fix.
But if there are better tools than typos, it should be fine.
There are some options.
- Remove _typos.toml
- Set up CI for typos
- Replace typos with other tool
I don't have strong motivation to introduce typos.
If we don't want to introduce it, let remove _typos.toml
(option 1).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For instance?
I've seen big projects use https://vale.sh but for it somebody needs to build and write the docs https://github.com/urfave/cli/issues?q=is%3Aissue+is%3Aopen+label%3Akind%2Fdocumentation
I prefer a tool we can run both local and CI.
cli
is a library. It does make sense if somebody runs code spellcheck once in a while, but for me spellchecking belongs to editor and CI, and not to the root files of a library project.
I like typos as it is built with Go and support auto fix.
No, it is a Rust project https://github.com/crate-ci/typos
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it is a Rust project
Oh, sorry. I was wrong. 😅
Anyway, I don't think we should introduce typos now.
I'll remove _typos.toml.
Thank you for your review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed. 76bcea5
docs/CHANGELOG.md
Outdated
@@ -71,7 +71,7 @@ The V2 changes were all shipped in [urfave/cli/pull/892](https://github.com/urfa | |||
### Added | |||
|
|||
- Added `NewStringSlice` and `NewIntSlice` for creating their related types | |||
- Added `Float64SliceFlag` for unmarshaling a list of floats from the user | |||
- Added `Float64SliceFlag` for unmarshalling a list of floats from the user |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is correct (per U.S. English –which I suppose is used everywhere in software world)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your review.
I reverted the fix. 6591222
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Thanks for your PR
What type of PR is this?
(REQUIRED)
What this PR does / why we need it:
(REQUIRED)
Which issue(s) this PR fixes:
(REQUIRED)
Fixes #1995
Special notes for your reviewer:
(fill-in or delete this section)
I'm using typos to detect and fix typo.
https://github.com/crate-ci/typos
typos supports auto fix, but it doesn't fix all typo and may have false positive.
We need to check if the fix is correct.
And we may need to configure typos.
Testing
(fill-in or delete this section)
Release Notes
(REQUIRED)