使用 xcodebuild 启动 clang 静态分析器

发布于 2024-11-16 14:23:50 字数 701 浏览 3 评论 0原文

我正在尝试在 hudson 构建服务器上设置 clang 静态分析器,如果我遵循建议 在此博文中,我遇到以下错误:

cc1obj: error: unrecognized command line option "-fdiagnostics-print-source-range-info"
cc1obj: warnings being treated as errors
cc1obj: warning: -Wuninitialized is not supported without -O
Command /usr/local/bin/libexec/ccc-analyzer failed with exit code 1
Command /usr/local/bin/libexec/ccc-analyzer failed with exit code 1

如果我将 RUN_CLANG_STATIC_ANALYZER 参数传递给xcodebuild (不使用 scan-build)它生成了一些 plist 文件,但我不知道如何向用户呈现这些文件,因为我期望 HTML 输出。

有人成功做到这一点吗?

I'm trying to set up clang static analyzer on a hudson build server and if I follow the advises in this blog post I've got the following errors:

cc1obj: error: unrecognized command line option "-fdiagnostics-print-source-range-info"
cc1obj: warnings being treated as errors
cc1obj: warning: -Wuninitialized is not supported without -O
Command /usr/local/bin/libexec/ccc-analyzer failed with exit code 1
Command /usr/local/bin/libexec/ccc-analyzer failed with exit code 1

and if I pass RUN_CLANG_STATIC_ANALYZER parameter to the xcodebuild (without using scan-build) it generates me a few plist files but I have no idea how to present those files to user because I expect for HTML output.

Does anybody succeed with this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

水晶透心 2024-11-23 14:23:50

使用 Xcode 4,您可以创建 .xcconfig 文件来覆盖项目构建设置中的任何方法。在这种情况下,创建一个 myConfig.xcconfig 并放置 RUN_CLANG_STATIC_ANALYZER = YES;然后你可以通过调用“xcodebuild -xcconfig myConfig.xcconfig”来运行它

With Xcode 4 you can create .xcconfig files to override any methods in the project build settings. In this case make a myConfig.xcconfig and put RUN_CLANG_STATIC_ANALYZER = YES; then you can run it by calling "xcodebuild -xcconfig myConfig.xcconfig"

花想c 2024-11-23 14:23:50

自从我提出这个问题以来已经两年多了,我决定使用 OCLint 来实现此目的。看起来是一个更可配置的选项,并且它支持 xcodebuild。

It's been more than two years since I asked this question and I decided to use OCLint for this purpose. Looks like a more configurable option and it supports xcodebuild from the box.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文