md-footer-template: "nothing was judged" should name the includes.byRule fix with its key

Đang mở Phù hợp với người mới
#501 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
72/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
devtools

Hướng nghiên cứu

Thông điệp được tạo ra bởi đường dẫn nothingJudged trong src/laws/documentation/md-footer-template.ts. Hãy đọc ở đó trước, sau đó tìm lawConfigKey trong modular-laws-registry.ts để xem khóa includes.byRule được suy ra từ tiêu đề law như thế nào. Hoàn thành khi thông điệp trên một dự án mà includes không chọn tệp .md nào chứa gợi ý includes.byRule với khóa đã suy ra, và một test bao phủ trường hợp đó. Các law khác báo 'includes select none of them' là các follow-up tùy chọn.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement

Version: after 8.0.0
Law: MD Footer Template (MANDATORY) — src/laws/documentation/md-footer-template.ts (nothingJudged)

What happens

When a project turns the opt-in law on while its includes.global names only source (for example src/**/*.ts), the law selects no Markdown file and reports:

8 Markdown file(s) exist, but the configured includes / ignores select none of them — nothing was judged

The cause is named, but not the fix. The run becomes partial, and the reader has to find out that the law takes its files through includes.byRule, under the key the registry sets for it (the slug of its title).

Suggested direction

Add the fix to the message, with the exact key:

… select none of them — nothing was judged. Give this law the Markdown files with includes.byRule: { "md-footer-template-mandatory": ["**/*.md"] }

Derive the key from the law's title the way the registry does (modular-laws-registry.ts, the lawConfigKey slug), not as a hard-coded string, so it stays right if the title changes. Red/green: the message on a project whose includes select no .md contains the includes.byRule hint with that key. The same pattern may apply to other laws that report "includes select none of them".

Ngôn ngữ chính
TypeScript
Star
0
Fork
0
Merge trung bình
2 giờ 36 phút
Pull request đã merge (30 ngày)
168

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Rule-Of-Code/RoC

Tất cả issue của Rule-Of-Code/RoC

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.