`Command.Validators` should be invoked only when the command options are arguments are valid
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
Hướng nghiên cứu
Không có tệp mã nguồn hoặc bài kiểm thử nào được nêu. Hãy bắt đầu bằng cách đọc issue liên quan #2645 và lần theo nơi các trình xác thực của Command được gọi so với việc xác thực tùy chọn và đối số. Công việc được xem là hoàn tất khi thứ tự khớp với hành vi được yêu cầu trong issue, hoặc tài liệu giải thích rõ ràng vì sao các trình xác thực của Command không thể đọc các giá trị tùy chọn và đối số đã được xác thực.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
For Option<T> and Argument<T>, custom validators are invoked before the conversion from the token (string) to T. It's well behavior for the use case such the production of better error messages, even so the behavior is not well documented (related #2645).
For Command, as same as above, validators are invoked before its options and arguments today, but it's useless.
I expect to be able to use Command validators for the complex validation of our command line. In other words, the options and arguments should be validated with their definitions (Arity, AllowMultipleArgumentsPerToken, CustomParser, etc, and Validators) first, then only when no one have any errors, the command validators should be invoked.
Or, reading the values of options and arguments from Command.Validators is incorrect? If so, better documentation is needed.
- Ngôn ngữ chính
- C#
- Star
- 3.7k
- Fork
- 434
- Merge trung bình
- 6 giờ 27 phút
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của dotnet/command-line-api
-
German localization is incompleteCó thể đã có người làm @b-v-d-e-v đã nhận 16 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
dotnet/command-line-api#2852 ·
-
Incomplete French (fr) translation: RequiredOptionWasNotProvided not translatedCó thể đã có người làm @JPBlanc đã nhận 113 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
dotnet/command-line-api#2822 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
dotnet/command-line-api#2792 · 2 bình luận · 16 reaction ·
-
`Argument.Arity` modify internal state on first get access.Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
dotnet/command-line-api#2704 ·
-
GetCompletions should check exit code of invoked applicationCó thể đã có người làm @baradgur đã nhận 1285 ngày trước. Đang mởArea-Completions bug help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
dotnet/command-line-api#2137 · 1 bình luận · 3 reaction ·
Tất cả issue của dotnet/command-line-api
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 60/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area: design documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
eyalgolan/statecraft-israel#883 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 3 ngày
-
area/indexing bug package/core triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Debug-only options are confusingĐang mởBug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
nunit/nunit-console#1913 ·
Maintainer thường phản hồi trong vòng 1 ngày