[Bug]: build-ss3-warnings only counts gcc source lines numbered 1000-9999
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
- 78/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- build-system, ci-cd, testing
Hướng nghiên cứu
Start with build-ss3-warnings.yml lines 76-95 and the warnings.txt layout from run 36063469992; inspect how the R step extracts and compares warning counts. Reproduce the existing CI command with the listed unused-variable cases, then verify that the baseline passes and each warning reaches the expected failure path.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
build-ss3-warnings.yml:79 (at 82f92f7) counts warnings with grep(pattern = "^ [0-9]", x = txt). gcc right-aligns line numbers in a 5-character field, so only source lines numbered 1000-9999 match: grepl("^ [0-9]", c(" 121 |", " 1947 |", "17560 |")) is FALSE TRUE FALSE. In the generated ss3.cpp (40,109 lines), 1000-9999 is DATA_SECTION code and FUNCTIONs start at line 16627. A new unused-variable warning in a FUNCTION passes the job with "Acceptable number of warnings: 0".
A counted warning fails the step on n_warn[1,1] applied to an integer (line 88, incorrect number of dimensions), not on the stop() at line 91. Line 95 reduces to n_warn < 0, so "decreased" never prints.
To Reproduce
I ran ADMB 13.2 tpl2cpp on 82f92f7, added one unused int per case to the tpl sources, compiled with the CI command under g++ 16.2, put the output into the warnings.txt layout from run 36063469992, and ran the R step unchanged:
| unused variable added in | ss3.cpp line | gcc warnings | job |
|---|---|---|---|
| nothing (baseline) | - | 0 | pass, count 0 |
SS_readdata_330.tpl LOCAL_CALCS |
1947 | 1 | fails on the R error |
get_natmort() |
17560 | 1 | pass, count 0 |
write_msg() in GLOBALS |
121 | 1 | pass, count 0 |
The -Wmisleading-indentation warning quoted in #561 (ss.cpp:34714) also passes. Counting ": warning:" lines instead counts each of these. Debian gcc 12.2 (C front end) prints the same margins; the CI image johnoel/admb-13.2:linux was not run. The latest run (36063469992) had no gcc warnings.
Expected behavior
Any new warning in SS3 code fails the job with "Increased number of warnings".
Which OS are you seeing the problem on?
Linux
Which version of SS3 are you seeing the problem on?
main at 82f92f7
Additional Context
The regex came in with #561 (312b64c). Happy to open a PR that:
- counts
": warning:"lines; - starts at
warn_line+2: line 76 skips the first gcc line, which for a file-scope warning is the warning itself (an unusedstatic intat ss3.cpp:20 counted 0 with only the regex fixed); - drops lines 87-89;
- compares against the reference file's warning count instead of
length(ref), which is 3 (with only 1 and 3, one new warning passed).
With all four, the baseline passed and every warning above reached the stop().
- Ngôn ngữ chính
- C++
- Star
- 46
- Fork
- 19
- 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
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 nmfs-ost/ss3-source-code
-
[Bug]: non-integer `Lbin_lo`/`Lbin_hi` are silently truncated under `Lbin_method = 1`, while method 3 raises a fatal error for the equivalent mistakeCó thể đã có người làm @Rick-Methot-NOAA đã nhận 5 ngày trước. Đang mở
nmfs-ost/ss3-source-code#784 · 1 người được giao ·
-
need warning and improved logic for generalized sizecompCó thể làm lại được @Rick-Methot-NOAA đã nhận 240 ngày trước và không có pull request nào đang mở. Đang mởcomposition in progress
nmfs-ost/ss3-source-code#751 · 1 bình luận · 1 người được giao ·
-
[Feature]: Add standard errors for area-specific quantitiesCó thể làm lại được @Rick-Methot-NOAA đã nhận 378 ngày trước và không có pull request nào đang mở. Đang mởarea & movement
nmfs-ost/ss3-source-code#731 · 3 bình luận · 1 người được giao ·
-
[Feature]: Create a basic report list that could serve as better starting configuration for customizationCó thể làm lại được @Rick-Methot-NOAA đã nhận 385 ngày trước và không có pull request nào đang mở. Đang mởmisc. output
nmfs-ost/ss3-source-code#723 · 1 người được giao ·
-
[Feature]: restrict biology output using the use_morph(g) flagCó thể làm lại được @Rick-Methot-NOAA đã nhận 407 ngày trước và không có pull request nào đang mở. Đang mởbiology misc. output ongoing
nmfs-ost/ss3-source-code#702 · 1 người được giao ·
Tất cả issue của nmfs-ost/ss3-source-code
Issue tương tự
-
`enzymexla.linalg.lu` lowering fails for a tall matrix: the permutation is built with the pivot typeĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
EnzymeAD/Enzyme-JAX#3286 ·
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 76/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 88/100
apache/iceberg-cpp#973 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add c++23 mapping to nvccĐang mởfeature request
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày