代码之家  ›  专栏  ›  技术社区  ›  Prajwal Udupa

ocint:错误:未加载规则

  •  1
  • Prajwal Udupa  · 技术社区  · 12 年前

    我正在尝试从命令行获取警告、错误、语法编码约定和圈复杂度的列表。我发现oclin可以用于我的目的。但后来我遇到了一个问题

    我想做的。

    xcodebuild -project testing.xcodeproj -target "testing" -configuration "Debug" -destination "platform=iOS Simulator,name=iPad" -sdk "iphonesimulator7.0" -IDEBuildOperationMaxNumberOfConcurrentCompileTasks=8 clean
    xcodebuild -project testing.xcodeproj -target "testing" -configuration "Debug" -destination "platform=iOS Simulator,name=iPad" -sdk "iphonesimulator7.0" -IDEBuildOperationMaxNumberOfConcurrentCompileTasks=8 build |tee xcodebuild.log
    

    ocint xcodebuild xcodebuild.log

    在此之前,一切都很顺利,甚至compilecommands.json都被正确创建。

    但当我跑的时候 oclint-json-compilation-database 那么我就得到了这个错误。

    我从 here 我必须使用 oclint [-enable-clang-static-analyzer] 在上述命令成功后

    如果有人知道如何解决这个问题,或者有更好的解决方案来满足我的要求,请告诉我

    编辑: 如果我使用 clint [-enable-clang-static-analyzer -R /usr/lib/oclint/rules ] 那我就错了 oclint: error: cannot find dynamic library for report type: text

    1 回复  |  直到 12 年前
        1
  •  0
  •   Prajwal Udupa    12 年前

    发现了我的问题。发布解决方案,因为它可以帮助某些人。

    我的问题是,我克隆了存储库,并手动将脚本文件粘贴到了usr/local/lib中,但这是不正确的!。我所做的是移除这些并进行了brew安装。

    这是命令

    brew install https://raw.github.com/ryuichisaito6/homebrew/f12a21dd274899ef9ab14cd97e45f315dd982cf6/Library/Formula/oclint.rb 
    

    谢谢