[Feature Request] Filename-based suppression per engine or file
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- typescript, yaml
Hướng nghiên cứu
Điểm bắt đầu là cấu hình CLI của code-analyzer; hãy bắt đầu bằng cách lần theo cách thiết lập YAML cấp cao nhất ignores.files được phân tích cú pháp và áp dụng. So sánh các dạng được yêu cầu ở cấp engine và theo từng rule, sau đó xác định phạm vi kiểm thử cho thấy việc loại trừ tên tệp có thể được giới hạn mà không ảnh hưởng đến các engine hoặc rule khác.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Product Area
The "code-analyzer" CLI
Your Need or Problem
I like the
ignores:
files:
- "**/utils.js"
feature.
Currently, it exists at the top level, meaning we can only exclude filenames for all engines. I would like to exclude at the engine or file level.
The background: Salesforce provides some stock/standard files (JavaScript, Visualforce, Aura, LWC) that have rule violations in them. Instead of having to fix them all when importing starter metadata, I want to exclude them... but I would like to do that from the config file.
IDEALLY, I could do a suppression PER RULE, but I fear that is too much to ask.
This is resulting in a LOT of false-positives and noise, and is stopping our pipeline every time we create a new kind of Experience Cloud site.
Your Desired Solution
engines:
pmd:
ignores:
- "selfRegister.cmp"
- "CommunityTemplate.page"
or
rules:
pmd:
"LoadCSSApexStylesheet":
severity: 2
ignores:
- "CommunityTemplate.page"
tags:
- AppExchange
- Security
- Visualforce
My vision for using Code Analyzer is that I have a standard config file I use for all my projects as a starting point, and that one would include suppressing checks on those files. I could load that as a default in each of my repos/projects.
Alternatives Considered
PMD doesn't have a robust "ignore this rule for this filepath" from the ruleset feature, so I know I'm asking for a lot here.
I can exclude files in my custom ruleset, but that only applies to pmd rules.
I can override the specific rule and make a very long XPath exception property, which works, and might be good for some files, but isn't ideal.
Additional Context (Screenshots, Files, etc)
No response
Workaround
I have been able to suppress for most files (not JavaScript) by editing the file. But I don't want to have to edit each default file as Salesforce creates them.
Urgency
Moderate
- Ngôn ngữ chính
- TypeScript
- Star
- 240
- Fork
- 52
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
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 forcedotcom/code-analyzer
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
forcedotcom/code-analyzer#2094 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
forcedotcom/code-analyzer#2093 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
forcedotcom/code-analyzer#2091 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
forcedotcom/code-analyzer#2090 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
forcedotcom/code-analyzer#2100 ·
Tất cả issue của forcedotcom/code-analyzer
Issue tương tự
-
area/frontend good first issue kind/cooldown
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
voidzero-dev/oxc-angular-compiler#511 ·
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 78/100
langchain-ai/deepagentsjs#898 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
anomalyco/models.dev#8509 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug documentation P2 UI/UX
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày