Conversation
Enable the same warning flags as dpkg-buildpackage for C and C++ targets so that a plain `cmake -Bbuild && cmake --build build` reports the same warnings/errors as the package build. debian/rules already appends -Wall (DEB_CXXFLAGS_MAINT_APPEND) and hardening=+all adds -Wformat -Werror=format-security; mirror those locally alongside the existing -Werror so warnings that would only fail the dpkg build are caught during local development. Log: align local cmake compile flags with dpkg-buildpackage PMS: TASK-394335
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Ivy233 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideCMake now applies the Debian-aligned -Wall, -Wformat, and -Werror=format-security flags to C and C++ targets, ensuring local builds surface the same format-related warnings and errors as dpkg-buildpackage. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
🔍 详细分析1. 语法逻辑 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: [] 2. 代码质量 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: ['微小建议:4 行 add_compile_options 可合并为单次调用以减少重复,但当前方式可读性良好且与现有代码风格一致,非必须修改'] 3. 代码性能 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: [] 4. 代码安全 🔒评价: 优秀 ✅ 通过
安全漏洞详情: 建议: ['本次新增的 -Wformat 和 -Werror=format-security 标志实际上增强了代码安全性,可在编译阶段捕获格式字符串漏洞'] 💡 改进建议代码示例// 暂无代码示例本报告由 AI 代码审查工具自动生成 |
|
TAG Bot New tag: 2.0.54 |
|
TAG Bot New tag: 2.0.55 |
|
TAG Bot New tag: 2.0.56 |
Enable the same warning flags as dpkg-buildpackage for C and C++ targets so that a plain
cmake -Bbuild && cmake --build buildreports the same warnings/errors as the package build. debian/rules already appends -Wall (DEB_CXXFLAGS_MAINT_APPEND) and hardening=+all adds -Wformat -Werror=format-security; mirror those locally alongside the existing -Werror so warnings that would only fail the dpkg build are caught during local development.Log: align local cmake compile flags with dpkg-buildpackage
PMS: TASK-394335
Summary by Sourcery
Align local CMake compiler checks with dpkg-buildpackage to catch packaging-build warnings during development.
Enhancements:
Build: