Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-64614

clang-tidy tool reports warnings generated by gcc

XMLWordPrintable

      A bit related to JENKINS-64612. The clang-tidy tool reports warnings generated by gcc.

      This is a bigger problem than it may seem. You could argue "well, just put them in different files for different tools to parse", but a common way to run clang-tidy is via cmake as 

      cmake -DCMAKE_CXX_CLANG_TIDY=clang-tidy .. && cmake --build .

      Meaning both the clang-tidy and gcc warnings are generated as a result of the same command being executed. This can't be separated (https://discourse.cmake.org/t/run-clang-tidy-only/2537), and has benefits over other ways of running clang-tidy (only check the files that have changed in incremental builds).

      In the same way JENKINS-64612 argues for only including warnings with a "-W" in them, here I would like to argue that the clang-tidy tool should filter-out the warnings with a "-W" in them.

      In fact, as of clang-tidy 11.0.0, the only categories clang-tidy reports are:

      abseil-*
      android-*
      boost-*
      bugprone-*
      cert-*
      clang-analyzer-*
      cppcoreguidelines-*
      darwin-*
      fuchsia-*
      google-*
      hicpp-*
      linuxkernel-*
      llvm-*
      llvmlibc-*
      misc-*
      modernize-*
      mpi-*
      objc-*
      openmp-*
      performance-*
      portability-*
      readability-*
      zircon-*

      (none of them starting with "-W").

       

            Unassigned Unassigned
            reddwarf94 Cristian
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: