Classify included headers without executable code as declaration-only, not no-data
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
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- testing-qa
Hướng nghiên cứu
Start with select_files in reporter.py and its declaration-only naming rule, then check how the scope aspect records compiled objects. Run the reporter on a workspace with Watchdog.hpp (included by WatchdogImpl_UT.cpp, no companion source) and read the unmapped_files.txt output. Done when that header is reported as declaration-only, no-data keeps only files no unit compiled or included, unit tests cover both cases, and the manual's unmapped-files section describes the rule.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Observation
unmapped_files.txt lists score/launch_manager/src/daemon/src/watchdog/details/Watchdog.hpp (lifecycle) as no-data, although WatchdogImpl_UT.cpp includes it and its tests run. The header holds only constexpr constants and includes, no function, so clang emits no coverage region for it and llvm-cov cannot list it. There is nothing to measure; the file belongs in the harmless declaration-only category.
Not a bug in the measurement: no coverage is lost. The category is wrong.
Why
select_files in reporter.py recognises declaration-only by a naming rule: a header without data whose same-stem source has data (foo.h next to a compiled foo.cpp). A header with no companion source, such as a constants-only or interface-only header, cannot be told apart from a header nothing includes, because a header without functions leaves no trace in the objects. It falls into no-data, the category that is meant to flag real gaps.
Proposal
Use the compiler's own knowledge of which headers were included:
- With
-MD/.ddependency files (Bazel's.doutputs ofCppCompileactions) or theshowIncludes-style data, the scope aspect can record the set of headers each translation unit included. - The reporter then classifies an unmapped header that appears in any compiled unit's include set as
declaration-only(included, nothing executable), and leavesno-datafor headers no unit included.
Alternative, cheaper but weaker: scan the header text for function definitions ({ bodies outside class/namespace declarations) and classify headers without any as declaration-only. Heuristic and fragile with templates and macros; the dependency-file route is exact.
Acceptance
Watchdog.hpp-style headers (included, no functions, no same-stem source) are reported asdeclaration-only.no-datakeeps only files no translation unit in the run compiled or included.- Unit test for both cases; end-to-end workspace gets one constants-only header without a companion source.
- Manual's unmapped-files section describes the rule.
- Ngôn ngữ chính
- Python
- Star
- 0
- Fork
- 3
- Merge trung bình
- 18 giờ 24 phút
- Pull request đã merge (30 ngày)
- 16
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 eclipse-score/coverage_tool
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
eclipse-score/coverage_tool#27 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
improve downstream testingĐang mởtesting
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 22/100
eclipse-score/coverage_tool#42 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
extend downstream test reposĐang mởtesting
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 20/100
eclipse-score/coverage_tool#41 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
testing
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
eclipse-score/coverage_tool#39 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
switch from pylint to basedpyrightCó thể đã có người làm @kirankumar-H-V đã nhận 8 ngày trước. Đang mởquality
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
eclipse-score/coverage_tool#30 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của eclipse-score/coverage_tool
Issue tương tự
-
docs: the dev-setup table and AGENTS.md name the reviewed_by guard that CI's Changelog job runsĐang mởarea: tools documentation good first issue ready for a contributor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
eyalgolan/statecraft-israel#873 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add cover art to song rowsĐang mởenhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 5 ngày
-
bug
Độ 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 good first issue
Độ 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
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày