Inputs: names starting with '-' become tool options, --static with --invoke runs a tool twice, missing inputs found late
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
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 小时 57 分钟
- 30 天内合并 PR
- 88
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 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 天内回复
-
Inputs: a file name starting with @ may be read as a response file by the compiler可能已有人在做 @SizzleUnrlsd 今天认领。 未关闭bug severity/minor
CoreTrace/coretrace#203 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Builds without a build type are unoptimized: the README's commands and CI's main job可能已有人在做 @SizzleUnrlsd 于 2 天前认领。 未关闭build severity/minor
CoreTrace/coretrace#192 · 已指派 1 人 ·
维护者通常 1 天内回复
查看 CoreTrace/coretrace 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
Mac mini M6 (16 GB): Q2_0 streaming works - measured 11.7->27.2 tok/s + arena fix for sub-32 GB Macs未关闭
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
champion good first issue remake source/qq
难度 2/5 1-3 小时 新手友好度 65/100
metasequoiaime/msime-windows#1025 ·
维护者通常 1 天内回复
-
backlog bug
难度 2/5 1-3 小时 新手友好度 75/100
EchoTools/nevr-runtime#653 ·
维护者通常 1 天内回复
-
`--fail-require-skip` never fires: run_tests.py searches stdout, but the unittest binary writes the skip summary to stderr可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复