[Feature Request] File based regex rules
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
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- typescript
Hướng nghiên cứu
Bắt đầu tại điểm vào CLI tải code-analyzer.yml và theo dõi cách regex custom_rules được phân tích. Xem xét cách một tệp quy tắc YAML bên ngoài có thể được tham chiếu và dùng chung, sau đó xác minh rằng các quy tắc inline hiện có tiếp tục hoạt động cùng với các quy tắc dựa trên tệp trong một lần chạy CLI tiêu biểu.
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
Allow for regex rules to be placed into their own files and referenced from code-analyzer.yml so that they can be more easily shared between projects instead of merging them into existing files.
Your Desired Solution
Lets say we had the rule:
name: Salesforce Code Analyzer Configuration
version: 1.0.0
rulesets: []
engines:
regex:
custom_rules:
ProhibitSuppressWarnings:
regex: /@SuppressWarnings\([^)]*\)|\/\/\s*NOPMD/gi
file_extensions: ['.apex', '.cls', '.trigger']
description:
'Prohibits the use of @SuppressWarnings annotations and
NOPMD comments in Apex code. Suppressions hide code quality
issues; prefer fixing the underlying problems or improving
rules instead.'
violation_message:
'Suppression of warnings is not allowed. Fix the underlying
issue or improve the rule instead of suppressing violations.'
severity: 'High'
tags: ['CodeStyle', 'Recommended']
I would like to take the details of that rule and put them in a different .yaml file, then refer to that .yaml file from code-analyzer.yml
Alternatives Considered
Keep adding rules to code-analyzer.yml like today, using a pre-processor/script ahead of every run, etc
Additional Context (Screenshots, Files, etc)
No response
Workaround
No response
Urgency
Low
- 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
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 45/100
forcedotcom/code-analyzer#2099 ·
Tất cả issue của forcedotcom/code-analyzer
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
vercel-labs/just-bash#464 ·
-
looksLikeSlug() is ASCII-only, so non-Latin entity slugs (e.g. Korean) skip exact match and collapse Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
TanStack/tanstack.com#1293 ·