[cmake-developers] Integration of clang-tidy

Daniel Pfeifer daniel at pfeifer-mail.de
Tue Apr 26 17:32:11 EDT 2016


On Mon, Apr 11, 2016 at 5:26 PM, Brad King <brad.king at kitware.com> wrote:
> On 04/08/2016 06:31 PM, Daniel Pfeifer wrote:
>> I implemented the integration of `clang-tidy` along the lines of the
>> `include-what-you-use` integration.
>> There is a new `<LANG>_CLANG_TIDY` target property that is initialized
>> with the value of the `CMAKE_<LANG>_CLANG_TIDY` variable.
>> It contains the command line for `clang-tidy` as a ;-list.
>
> Nice.  The patch is very complete.  Applied:
>
>  Add options to run clang-tidy with the compiler
>  https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b2db0170

This is a follow up patch:

Clang-Tidy writes the number of warnings, the number of suppressed
warnings, and instructions on how to suppress warnings to stderr.  Since
each source file is checked individually, this repetitive information is
disturbing and should be suppressed.

The actual warning messages are written to stdout.  Some IDEs (eg.
QtCreator) analyze only stderr for issues.  Redirecting Clang-Tidy's
stdout to stderr makes sure the warnings are correctly displayed.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Clang-Tidy-copy-stdout-to-sterr-ignore-original-stde.patch
Type: text/x-patch
Size: 2029 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20160426/2293689f/attachment.bin>


More information about the cmake-developers mailing list