clang-tidy support followup (actually error travis job with warnings/errors)
还没有人认领这个 Issue。
- 主要语言
- C++
- 星标
- 74
- 派生
- 9
- PR 合并指标
- 30 天内没有已合并 PR
描述
As mentioned at https://github.com/mapbox/node-cpp-skel/pull/64#discussion_r133848127 and https://github.com/mapbox/node-cpp-skel/pull/64#discussion_r133848275 when I set up the make tidy target I was unable to find a way to have clang-tidy return non-zero on warnings/errors.
What this means is that the clang-tidy job on travis will only fail when clang tidy notices problems AND fixes them. Then it will leave behind a git diff and the presence of that diff will trigger the job to fail.
But because clang-tidy cannot auto-fix all problems their is a large class of warnings/errors that do not fail the script and therefore may be present but not failing the travis job.
The todo here is to figure out if the usage of clang-tidy can be fixed (are we doing something wrong, forgetting some flag?) to make clang-tidy return a non-zero error code when it encounters warnings/errors.
/cc @GretaCB who saw this recently with shaver - locally @GretaCB saw a number of pretty important clang-tidy warnings that were silently passing on travis since they were not causing the job to fail.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
先从 make tidy target 和 Travis clang-tidy job 开始,然后阅读关于原始设置的两个已链接 pull request 讨论评论。重现一个不会被自动修复的警告,并检查命令的退出状态和生成的 git diff。完成的标准是 clang-tidy 警告或错误能够可靠地使 Travis job 失败,包括它无法自动修复的问题。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- cpp
- 领域
- build-system, ci-cd, tooling
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100