Cleanup: class-level Halstead and cyclomatic metrics are computed but never output
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ó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
Hướng nghiên cứu
Start by reading storeClassMetrics() and getMetrics() in src/PhpParser/HalsteadMetricsVisitor.php, then check how CombinedMetricsVisitor.php consumes the results and how CyclomaticComplexityCalculator.php builds classSummary(). Trace the report and console output paths to decide whether class metrics should be exposed in class-grouped views or removed. Done means class-level calculations are either shown in the relevant output or deleted, with tests covering the chosen behavior.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Where
src/PhpParser/HalsteadMetricsVisitor.php:241-247(storeClassMetrics()) and:279-289(getMetrics()returnsclasses)src/PhpParser/CombinedMetricsVisitor.php:142-146(reads onlymethods)src/Business/Cyclomatic/CyclomaticComplexityCalculator.php:144-158(classSummary()fillsclasses)
Observed
Class-level Halstead and cyclomatic metrics are calculated, but no code reads the classes keys. They never reach any report or console output.
Expected
Either the class-level values are output, for example in the class-grouped views, or the calculation is removed.
Repro
grep -rn "'classes'\]" src
The only reads are inside the calculator itself.
- Ngôn ngữ chính
- PHP
- Star
- 55
- Fork
- 3
- Merge trung bình
- 25 phút
- Pull request đã merge (30 ngày)
- 22
Chuẩn bị môi trường
- Có Dockerfile hoặc 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 Phauthentic/cognitive-code-analysis
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Phauthentic/cognitive-code-analysis#94 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
Phauthentic/cognitive-code-analysis#93 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Phauthentic/cognitive-code-analysis#119 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Feature: vscode integrationĐang mởbacklog enhancement help wanted
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Phauthentic/cognitive-code-analysis#30 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
backlog enhancement help wanted
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 42/100
Phauthentic/cognitive-code-analysis#27 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Phauthentic/cognitive-code-analysis
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
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 95/100
My-Little-Forum/mylittleforum#936 ·
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 84/100
mailcow/mailcow-dockerized#7652 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
After recording the fallback URL is signed as Absolute, while the signature test uses RelativeĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100