Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[BUG][code-analyzer] Disabled rules are moved to the end of the config file rules list

Đang mở
#2,019 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

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

Đánh giá

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

Hướng nghiên cứu

Bắt đầu với lệnh sf code-analyzer config và tái hiện vấn đề bằng lệnh được cung cấp cùng với code-analyzer.yml. Kiểm tra danh sách quy tắc pmd được tạo, sau đó xác minh rằng tất cả các quy tắc, bao gồm cả những quy tắc có disabled: true, đều được sắp xếp theo thứ tự bảng chữ cái dựa trên khóa duy nhất và vẫn giữ nguyên như vậy sau khi tạo lại.

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

Mô tả

BUG P3
Have you tried to resolve this issue yourself first?
  • I confirm I have gone through the above steps and still have an issue to report.
Bug Description

I disabled some rules and recreated the config file. ( see #2013 )

All the disabled rules were moved to the end of the pmd section.

But I want to view ALL the PMD rules alphabetized so I know which ones are in there.

Output / Logs

Steps To Reproduce
  1. Disabled a rule with disabled: true
  2. Run echo 'y' | sf code-analyzer config --include-unmodified-rules --rule-selector all --config-file code-analyzer.yml --output-file code-analyzer.yml
  3. See that the disabled rules are moved.
Expected Behavior

All rules should be alphabetized by their unique key. This extra sort doesn't help anything and only can confuse people.

Operating System

macOS

Salesforce CLI Version

@salesforce/cli/2.128.5 darwin-arm64 node-v22.22.1

Code Analyzer Plugin (code-analyzer) Version

5.11.1

Node Version

No response

Java Version

No response

Python Version

No response

Additional Context (Screenshots, Files, etc)
Image

This is actually a significant bug because changing from expected behavior will confuse people.

Workaround

No response

Urgency

Moderate

Ngôn ngữ chính
TypeScript
Star
240
Fork
52
Merge trung bình
9 giờ 48 phút
Pull request đã merge (30 ngày)
3

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

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 forcedotcom/code-analyzer

Tất cả issue của forcedotcom/code-analyzer

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.