[MacPorts] #62308: clang-11: set-xcode-analyzer does not work
MacPorts
noreply at macports.org
Wed May 12 15:29:19 UTC 2021
#62308: clang-11: set-xcode-analyzer does not work
-----------------------+--------------------
Reporter: szhorvat | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.6.4
Resolution: | Keywords:
Port: clang-11 |
-----------------------+--------------------
Comment (by szhorvat):
This is my first time using it (successfully). I documented my personal
use case here:
https://github.com/igraph/igraph/wiki/Running-linters-and-analysers#run-
within-xcode
Official (but somewhat outdated) docs are here:
https://clang-analyzer.llvm.org/xcode.html
Beware that this tool patches the following file within Xcode on my
machine, and causes Xcode to use the selected Clang version for static
analysis:
{{{
/Applications/Xcode.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode
/Plug-ins/Clang LLVM 1.0.xcplugin/Contents/Resources/Clang LLVM 1.0.xcspec
}}}
The way I used it was the following:
{{{
sudo set-xcode-analyzer-mp-11 --use-checker-
build=/opt/local/libexec/llvm-11/
}}}
The change can be reverted like this:
{{{
sudo set-xcode-analyzer-mp-11 --use-xcode-clang
}}}
Both appeared to work, although I didn't do a direct diff to determine
that the revert was accurate. I only inspected the result manually.
To use the static analysis feature from within Xcode, refer to my first
two links.
--
Ticket URL: <https://trac.macports.org/ticket/62308#comment:6>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list