[Bug]: build-ss3-warnings only counts gcc source lines numbered 1000-9999
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 78/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 領域
- build-system, ci-cd, testing
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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().
- 主要言語
- C++
- スター
- 46
- フォーク
- 19
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
nmfs-ost/ss3-source-code のほかの issue
-
[Bug]: non-integer `Lbin_lo`/`Lbin_hi` are silently truncated under `Lbin_method = 1`, while method 3 raises a fatal error for the equivalent mistake対応中かも @Rick-Methot-NOAA が 4 日前に担当しました。 オープン
nmfs-ost/ss3-source-code#784 · 担当者 1 名 ·
-
need warning and improved logic for generalized sizecomp再び着手できるかも @Rick-Methot-NOAA が 239 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンcomposition in progress
nmfs-ost/ss3-source-code#751 · コメント 1 件 · 担当者 1 名 ·
-
[Feature]: Add standard errors for area-specific quantities再び着手できるかも @Rick-Methot-NOAA が 377 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンarea & movement
nmfs-ost/ss3-source-code#731 · コメント 3 件 · 担当者 1 名 ·
-
[Feature]: Create a basic report list that could serve as better starting configuration for customization再び着手できるかも @Rick-Methot-NOAA が 384 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンmisc. output
nmfs-ost/ss3-source-code#723 · 担当者 1 名 ·
-
[Feature]: restrict biology output using the use_morph(g) flag再び着手できるかも @Rick-Methot-NOAA が 406 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbiology misc. output ongoing
nmfs-ost/ss3-source-code#702 · 担当者 1 名 ·
nmfs-ost/ss3-source-code の issue をすべて見る
似ている issue
-
Unconfirmed bug
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
luanti-org/luanti#17605 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
area: config area: firmware priority: P2 - medium size: S type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Mizithra/ActiveTerrain#16 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
grumpycoders/pcsx-redux#2171 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
bytedance/trae-agent#524 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信