Inputs: names starting with '-' become tool options, --static with --invoke runs a tool twice, missing inputs found late
メンテナーはふだん 1 日以内に返信
評価
調査の方向性
Start with src/Process/Tools/FlawfinderToolImplementation.cpp near line 18 and include/Process/Tools/AnalysisTools.hpp lines 212-213, where input paths are passed to tools without a -- separator, and compare with how the cppcheck and runtime-analyzer paths are built. Then find where --static and --invoke selections are combined, and check the input-resolution step for missing files and --compile-commands. Done means each acceptance item in the issue has a test: a -x.c input is analyzed, cppcheck runs once, and a missing path exits 1 with that path named.
索引モデルが issue の本文から書いたものです。
説明
Three problems with how inputs reach the tools, found by the resilience campaign (docs/quality/resilience.md).
1. File names that start with - are read as options (C37)
ctrace --input ./-F.c --invoke flawfinder
The path is normalized to -F.c and passed to flawfinder as an argument, which reads it as an option: *** getopt error: option -. not recognized, exit 3. A repository can name its files freely, and flawfinder and ikos have options that write files. src/Process/Tools/FlawfinderToolImplementation.cpp:18 and include/Process/Tools/AnalysisTools.hpp:212-213 pass paths without a -- separator; cppcheck and tscancode use --file-list, and the runtime analyzer already passes --.
Fix: pass -- before the file paths, or ./ before a path that starts with -.
2. --static with --invoke runs a tool twice (C36)
ctrace --input ok.c --static --invoke cppcheck runs cppcheck twice and counts each of its findings twice.
Fix: merge the selections into one set of tools before running them.
3. Missing inputs are found late (C07, C08, C23)
A missing input file is passed to the tools, which fail: the run ends with exit 3, "cppcheck could not run", instead of saying that the file does not exist. A --compile-commands that does not exist gives "No input files resolved" without naming it.
Fix: check that each input exists before running any tool, and exit 1 naming the missing path.
Acceptance
- An input named
-x.cis analyzed by every tool. --static --invoke cppcheckruns cppcheck once.- A missing input or compile database exits 1 with its path in the message.
- A test for each.
- 主要言語
- C++
- スター
- 5
- フォーク
- 4
- 平均マージ
- 1時間 9分
- マージ済み PR(30日)
- 81
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
CoreTrace/coretrace のほかの issue
-
chore good first issue severity/minor
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
build severity/minor
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
CoreTrace/coretrace#176 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
build good first issue severity/minor
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
test: add unit tests for ctrace::RunDirectory対応中かも @tecnolgd が 3 日前に担当しました。 オープンgood first issue test
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
CoreTrace/coretrace#164 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Release a macOS disk image (.dmg) for Apple silicon対応中かも @SizzleUnrlsd が今日担当しました。 オープンbuild enhancement
CoreTrace/coretrace#198 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
CoreTrace/coretrace の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
NVIDIA-RTX/NRI#277 ·
メンテナーはふだん 1 日以内に返信
-
os:Linux
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 3 日以内に返信