-
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
fix: check duplicated sub command name and alias #1805
Conversation
4c30734
to
5f20f10
Compare
5f20f10
to
695594a
Compare
79da4fa
to
8572933
Compare
8572933
to
a4389c3
Compare
a4389c3
to
8ab701e
Compare
On the surface LGTM. Need somebody to get into deeper logic, like using new |
8ab701e
to
57a3722
Compare
@abitrolly Who do you think should review the code? Could you invite him/her? |
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.
@linrl3 Thank you so much for your PR.
64386cd
to
77c9e15
Compare
77c9e15
to
36ebd0a
Compare
[](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/urfave/cli/v2](https://togithub.com/urfave/cli) | require | minor | `v2.25.7` -> `v2.26.0` | --- ### Release Notes <details> <summary>urfave/cli (github.com/urfave/cli/v2)</summary> ### [`v2.26.0`](https://togithub.com/urfave/cli/releases/tag/v2.26.0) [Compare Source](https://togithub.com/urfave/cli/compare/v2.25.7...v2.26.0) #### What's Changed - Bash completion nits by [@​meatballhat](https://togithub.com/meatballhat) in [https://github.com/urfave/cli/pull/1762](https://togithub.com/urfave/cli/pull/1762) - Chore: Rename mkdocs requirements file name by [@​dearchap](https://togithub.com/dearchap) in [https://github.com/urfave/cli/pull/1776](https://togithub.com/urfave/cli/pull/1776) - Fix:(issue\_1787) Add fix for commands not listed when hide help comma… by [@​dearchap](https://togithub.com/dearchap) in [https://github.com/urfave/cli/pull/1788](https://togithub.com/urfave/cli/pull/1788) - Fix nil HelpFlag panic (v2) by [@​wxiaoguang](https://togithub.com/wxiaoguang) in [https://github.com/urfave/cli/pull/1795](https://togithub.com/urfave/cli/pull/1795) - Always get 0 for a nested int64 value in v2.25.7 by [@​stephenfire](https://togithub.com/stephenfire) in [https://github.com/urfave/cli/pull/1799](https://togithub.com/urfave/cli/pull/1799) - Helper messages for documenting build process by [@​abitrolly](https://togithub.com/abitrolly) in [https://github.com/urfave/cli/pull/1800](https://togithub.com/urfave/cli/pull/1800) - fix: check duplicated sub command name and alias by [@​linrl3](https://togithub.com/linrl3) in [https://github.com/urfave/cli/pull/1805](https://togithub.com/urfave/cli/pull/1805) - Fix:(issue\_1689) Have consistent behavior for default text in man and… by [@​dearchap](https://togithub.com/dearchap) in [https://github.com/urfave/cli/pull/1825](https://togithub.com/urfave/cli/pull/1825) - Fix linting issues by [@​skelouse](https://togithub.com/skelouse) in [https://github.com/urfave/cli/pull/1696](https://togithub.com/urfave/cli/pull/1696) #### New Contributors - [@​stephenfire](https://togithub.com/stephenfire) made their first contribution in [https://github.com/urfave/cli/pull/1799](https://togithub.com/urfave/cli/pull/1799) - [@​linrl3](https://togithub.com/linrl3) made their first contribution in [https://github.com/urfave/cli/pull/1805](https://togithub.com/urfave/cli/pull/1805) **Full Changelog**: urfave/cli@v2.25.7...v2.26.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/eddiebeazer/unreal-ci). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy41OS44IiwidXBkYXRlZEluVmVyIjoiMzcuNTkuOCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
[](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/go-git/go-git/v5](https://togithub.com/go-git/go-git) | require | patch | `v5.10.0` -> `v5.10.1` | | [github.com/urfave/cli/v2](https://togithub.com/urfave/cli) | require | minor | `v2.25.7` -> `v2.26.0` | | golang.org/x/exp | require | digest | `9a3e603` -> `6522937` | | golang.org/x/term | require | minor | `v0.14.0` -> `v0.15.0` | --- ### Release Notes <details> <summary>go-git/go-git (github.com/go-git/go-git/v5)</summary> ### [`v5.10.1`](https://togithub.com/go-git/go-git/releases/tag/v5.10.1) [Compare Source](https://togithub.com/go-git/go-git/compare/v5.10.0...v5.10.1) #### What's Changed - Worktree, ignore ModeSocket files by [@​steiler](https://togithub.com/steiler) in [https://github.com/go-git/go-git/pull/930](https://togithub.com/go-git/go-git/pull/930) - git: add tracer package by [@​aymanbagabas](https://togithub.com/aymanbagabas) in [https://github.com/go-git/go-git/pull/916](https://togithub.com/go-git/go-git/pull/916) - remote: Flip clause for fast-forward only check by [@​adityasaky](https://togithub.com/adityasaky) in [https://github.com/go-git/go-git/pull/875](https://togithub.com/go-git/go-git/pull/875) - plumbing: transport/ssh, Fix nil pointer dereference caused when an unreachable proxy server is set. Fixes [#​900](https://togithub.com/go-git/go-git/issues/900) by [@​anandf](https://togithub.com/anandf) in [https://github.com/go-git/go-git/pull/901](https://togithub.com/go-git/go-git/pull/901) - plumbing: uppload-server-info, implement upload-server-info by [@​aymanbagabas](https://togithub.com/aymanbagabas) in [https://github.com/go-git/go-git/pull/896](https://togithub.com/go-git/go-git/pull/896) - plumbing: optimise memory consumption for filesystem storage by [@​pjbgf](https://togithub.com/pjbgf) in [https://github.com/go-git/go-git/pull/799](https://togithub.com/go-git/go-git/pull/799) - plumbing: format/packfile, Refactor patch delta by [@​pjbgf](https://togithub.com/pjbgf) in [https://github.com/go-git/go-git/pull/908](https://togithub.com/go-git/go-git/pull/908) - plumbing: fix empty uploadpack request error by [@​aymanbagabas](https://togithub.com/aymanbagabas) in [https://github.com/go-git/go-git/pull/932](https://togithub.com/go-git/go-git/pull/932) - plumbing: transport/git, Improve tests error message by [@​pjbgf](https://togithub.com/pjbgf) in [https://github.com/go-git/go-git/pull/752](https://togithub.com/go-git/go-git/pull/752) - plumbing: format/pktline, Respect pktline error-line errors by [@​aymanbagabas](https://togithub.com/aymanbagabas) in [https://github.com/go-git/go-git/pull/936](https://togithub.com/go-git/go-git/pull/936) - utils: remove ioutil.Pipe and use std library io.Pipe by [@​aymanbagabas](https://togithub.com/aymanbagabas) in [https://github.com/go-git/go-git/pull/922](https://togithub.com/go-git/go-git/pull/922) - utils: move trace to utils by [@​aymanbagabas](https://togithub.com/aymanbagabas) in [https://github.com/go-git/go-git/pull/931](https://togithub.com/go-git/go-git/pull/931) - cli: separate go module for cli by [@​aymanbagabas](https://togithub.com/aymanbagabas) in [https://github.com/go-git/go-git/pull/914](https://togithub.com/go-git/go-git/pull/914) - build: bump github.com/google/go-cmp from 0.5.9 to 0.6.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/go-git/go-git/pull/887](https://togithub.com/go-git/go-git/pull/887) - build: bump actions/setup-go from 3 to 4 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/go-git/go-git/pull/891](https://togithub.com/go-git/go-git/pull/891) - build: bump github.com/skeema/knownhosts from 1.2.0 to 1.2.1 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/go-git/go-git/pull/888](https://togithub.com/go-git/go-git/pull/888) - build: bump actions/checkout from 3 to 4 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/go-git/go-git/pull/890](https://togithub.com/go-git/go-git/pull/890) - build: bump golang.org/x/sys from 0.13.0 to 0.14.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/go-git/go-git/pull/907](https://togithub.com/go-git/go-git/pull/907) - build: bump golang.org/x/text from 0.13.0 to 0.14.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/go-git/go-git/pull/906](https://togithub.com/go-git/go-git/pull/906) - build: bump golang.org/x/crypto from 0.14.0 to 0.15.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/go-git/go-git/pull/917](https://togithub.com/go-git/go-git/pull/917) - build: bump golang.org/x/net from 0.17.0 to 0.18.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/go-git/go-git/pull/918](https://togithub.com/go-git/go-git/pull/918) #### New Contributors - [@​anandf](https://togithub.com/anandf) made their first contribution in [https://github.com/go-git/go-git/pull/901](https://togithub.com/go-git/go-git/pull/901) - [@​steiler](https://togithub.com/steiler) made their first contribution in [https://github.com/go-git/go-git/pull/930](https://togithub.com/go-git/go-git/pull/930) **Full Changelog**: go-git/go-git@v5.10.0...v5.10.1 </details> <details> <summary>urfave/cli (github.com/urfave/cli/v2)</summary> ### [`v2.26.0`](https://togithub.com/urfave/cli/releases/tag/v2.26.0) [Compare Source](https://togithub.com/urfave/cli/compare/v2.25.7...v2.26.0) #### What's Changed - Bash completion nits by [@​meatballhat](https://togithub.com/meatballhat) in [https://github.com/urfave/cli/pull/1762](https://togithub.com/urfave/cli/pull/1762) - Chore: Rename mkdocs requirements file name by [@​dearchap](https://togithub.com/dearchap) in [https://github.com/urfave/cli/pull/1776](https://togithub.com/urfave/cli/pull/1776) - Fix:(issue\_1787) Add fix for commands not listed when hide help comma… by [@​dearchap](https://togithub.com/dearchap) in [https://github.com/urfave/cli/pull/1788](https://togithub.com/urfave/cli/pull/1788) - Fix nil HelpFlag panic (v2) by [@​wxiaoguang](https://togithub.com/wxiaoguang) in [https://github.com/urfave/cli/pull/1795](https://togithub.com/urfave/cli/pull/1795) - Always get 0 for a nested int64 value in v2.25.7 by [@​stephenfire](https://togithub.com/stephenfire) in [https://github.com/urfave/cli/pull/1799](https://togithub.com/urfave/cli/pull/1799) - Helper messages for documenting build process by [@​abitrolly](https://togithub.com/abitrolly) in [https://github.com/urfave/cli/pull/1800](https://togithub.com/urfave/cli/pull/1800) - fix: check duplicated sub command name and alias by [@​linrl3](https://togithub.com/linrl3) in [https://github.com/urfave/cli/pull/1805](https://togithub.com/urfave/cli/pull/1805) - Fix:(issue\_1689) Have consistent behavior for default text in man and… by [@​dearchap](https://togithub.com/dearchap) in [https://github.com/urfave/cli/pull/1825](https://togithub.com/urfave/cli/pull/1825) - Fix linting issues by [@​skelouse](https://togithub.com/skelouse) in [https://github.com/urfave/cli/pull/1696](https://togithub.com/urfave/cli/pull/1696) #### New Contributors - [@​stephenfire](https://togithub.com/stephenfire) made their first contribution in [https://github.com/urfave/cli/pull/1799](https://togithub.com/urfave/cli/pull/1799) - [@​linrl3](https://togithub.com/linrl3) made their first contribution in [https://github.com/urfave/cli/pull/1805](https://togithub.com/urfave/cli/pull/1805) **Full Changelog**: urfave/cli@v2.25.7...v2.26.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 6am on monday" in timezone Australia/Sydney, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/google/osv-scanner). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy44MS4zIiwidXBkYXRlZEluVmVyIjoiMzcuODEuMyIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->
[](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | code.gitea.io/sdk/gitea | require | minor | `v0.16.0` -> `v0.17.0` | | [github.com/antonmedv/expr](https://togithub.com/antonmedv/expr) | require | patch | `v1.15.5` -> `v1.15.6` | | [github.com/golang-jwt/jwt/v5](https://togithub.com/golang-jwt/jwt) | require | minor | `v5.1.0` -> `v5.2.0` | | [github.com/urfave/cli/v2](https://togithub.com/urfave/cli) | require | minor | `v2.25.7` -> `v2.26.0` | --- ### Release Notes <details> <summary>antonmedv/expr (github.com/antonmedv/expr)</summary> ### [`v1.15.6`](https://togithub.com/expr-lang/expr/releases/tag/v1.15.6) [Compare Source](https://togithub.com/antonmedv/expr/compare/v1.15.5...v1.15.6) - This is a new release for `expr-lang/epxr`. </details> <details> <summary>golang-jwt/jwt (github.com/golang-jwt/jwt/v5)</summary> ### [`v5.2.0`](https://togithub.com/golang-jwt/jwt/releases/tag/v5.2.0) [Compare Source](https://togithub.com/golang-jwt/jwt/compare/v5.1.0...v5.2.0) #### What's Changed - Exported `NewValidator` by [@​oxisto](https://togithub.com/oxisto) in [https://github.com/golang-jwt/jwt/pull/349](https://togithub.com/golang-jwt/jwt/pull/349) - Improve ErrInvalidKeyType error messages by [@​Laurin-Notemann](https://togithub.com/Laurin-Notemann) in [https://github.com/golang-jwt/jwt/pull/361](https://togithub.com/golang-jwt/jwt/pull/361) - Update MIGRATION_GUIDE.md by [@​jbarham](https://togithub.com/jbarham) in [https://github.com/golang-jwt/jwt/pull/363](https://togithub.com/golang-jwt/jwt/pull/363) #### New Contributors - [@​Laurin-Notemann](https://togithub.com/Laurin-Notemann) made their first contribution in [https://github.com/golang-jwt/jwt/pull/361](https://togithub.com/golang-jwt/jwt/pull/361) - [@​jbarham](https://togithub.com/jbarham) made their first contribution in [https://github.com/golang-jwt/jwt/pull/363](https://togithub.com/golang-jwt/jwt/pull/363) **Full Changelog**: golang-jwt/jwt@v5.1.0...v5.2.0 </details> <details> <summary>urfave/cli (github.com/urfave/cli/v2)</summary> ### [`v2.26.0`](https://togithub.com/urfave/cli/releases/tag/v2.26.0) [Compare Source](https://togithub.com/urfave/cli/compare/v2.25.7...v2.26.0) #### What's Changed - Bash completion nits by [@​meatballhat](https://togithub.com/meatballhat) in [https://github.com/urfave/cli/pull/1762](https://togithub.com/urfave/cli/pull/1762) - Chore: Rename mkdocs requirements file name by [@​dearchap](https://togithub.com/dearchap) in [https://github.com/urfave/cli/pull/1776](https://togithub.com/urfave/cli/pull/1776) - Fix:(issue\_1787) Add fix for commands not listed when hide help comma… by [@​dearchap](https://togithub.com/dearchap) in [https://github.com/urfave/cli/pull/1788](https://togithub.com/urfave/cli/pull/1788) - Fix nil HelpFlag panic (v2) by [@​wxiaoguang](https://togithub.com/wxiaoguang) in [https://github.com/urfave/cli/pull/1795](https://togithub.com/urfave/cli/pull/1795) - Always get 0 for a nested int64 value in v2.25.7 by [@​stephenfire](https://togithub.com/stephenfire) in [https://github.com/urfave/cli/pull/1799](https://togithub.com/urfave/cli/pull/1799) - Helper messages for documenting build process by [@​abitrolly](https://togithub.com/abitrolly) in [https://github.com/urfave/cli/pull/1800](https://togithub.com/urfave/cli/pull/1800) - fix: check duplicated sub command name and alias by [@​linrl3](https://togithub.com/linrl3) in [https://github.com/urfave/cli/pull/1805](https://togithub.com/urfave/cli/pull/1805) - Fix:(issue\_1689) Have consistent behavior for default text in man and… by [@​dearchap](https://togithub.com/dearchap) in [https://github.com/urfave/cli/pull/1825](https://togithub.com/urfave/cli/pull/1825) - Fix linting issues by [@​skelouse](https://togithub.com/skelouse) in [https://github.com/urfave/cli/pull/1696](https://togithub.com/urfave/cli/pull/1696) #### New Contributors - [@​stephenfire](https://togithub.com/stephenfire) made their first contribution in [https://github.com/urfave/cli/pull/1799](https://togithub.com/urfave/cli/pull/1799) - [@​linrl3](https://togithub.com/linrl3) made their first contribution in [https://github.com/urfave/cli/pull/1805](https://togithub.com/urfave/cli/pull/1805) **Full Changelog**: urfave/cli@v2.25.7...v2.26.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 4am" (UTC), Automerge - "before 4am" (UTC). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/woodpecker-ci/woodpecker). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy44MS4zIiwidXBkYXRlZEluVmVyIjoiMzcuODEuMyIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: qwerty287 <[email protected]>
What type of PR is this?
What this PR does / why we need it:
Fix #785.
Which issue(s) this PR fixes:
Fix #785
Special notes for your reviewer:
This fix is only for v2. Do we need to fix it in other versions?
Testing
result:
Release Notes
(REQUIRED)