Skip to content

放宽 CLI 命令、选项和镜像代号的大小写限制 - #428

Open
Mikachu2333 wants to merge 5 commits into
RubyMetric:devfrom
Mikachu2333:split/cli-case-insensitive
Open

Mikachu2333 wants to merge 5 commits into
RubyMetric:devfrom
Mikachu2333:split/cli-case-insensitive

Conversation

@Mikachu2333

Copy link
Copy Markdown
Collaborator

从 #407 拆出大小写比较变更,直接基于 dev,不包含 Dry Run 行为修改。

  • 命令、选项、列表关键词和镜像站代号按大小写不敏感的方式匹配,-SCOPE=PROJECT 与 -ScOpE PrOjEcT 均可用。
  • 自定义 URL 路径保持原样,文件路径和配置内容也不会被统一转换。

验证:Windows 原生构建及 test/cli.pl fastcheck(28/28);Debian WSL 构建及 make test-xy 通过。

@github-actions

Copy link
Copy Markdown

Hi @Mikachu2333

❤️ 感谢你的贡献!我们将在最少半小时,最多5天内阅读此 PR 并回复你

Comment thread lib/xy.h Resolved
Comment thread lib/xy.h Resolved
@ccmywish

Copy link
Copy Markdown
Contributor
C:\> gcc --version
gcc.exe (GCC) 15.2.0
Copyright (C) 2025 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

C:\> gcc --VERsion
gcc.exe: error: unrecognized command-line option '--VERsion'; did you mean '--version'?
gcc.exe: fatal error: no input files
compilation terminated.

似乎并没有把用户选项接受大小写无关的传统。我觉得没有必要放宽选项。

用户输入的镜像站名称可以大小写无关。

@Mikachu2333

Copy link
Copy Markdown
Collaborator Author

也有道理,我主要是想支持镜像站和关键词大小写的,想着做都做了,就连选项一起免大小写

@Mikachu2333
Mikachu2333 requested a review from ccmywish November 28, 2026 13:12
Comment thread test/cli.pl Resolved
@Mikachu2333
Mikachu2333 requested a review from ccmywish November 30, 2026 08:38

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

改善加强 改善加强

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants