Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-26015

clang-tidy check options breaks analysis

    XMLWordPrintable

Details

    • 217dfdda7ac9745532c5a1c46de9dce354bed541 (qt-creator/qt-creator/5.0)

    Description

      After adding AllowIntegerConditions and/or AllowPointerConditions options for readability-implicit-bool-conversion I get following error:

      Failed to analyze "/home/ai/projects/fheroes2/src/engine/agg_file.cpp": Clang-Tidy finished with exit code: 1.
      Command line: /usr/bin/clang-tidy '-config={Checks: '\''-*,bugprone-bool-pointer-implicit-conversion,modernize-use-bool-literals,readability-implicit-bool-conversion,readability-simplify-boolean-expr,-clang-diagnostic-*'\'', CheckOptions: [{key: '\''readability-simplify-boolean-expr.ChainedConditionalAssignment'\'', value: '\''10'\''},{key: '\''readability-simplify-boolean-expr.ChainedConditionalReturn'\'', value: '\''10'\''}{key: '\''readability-implicit-bool-conversion.AllowIntegerConditions'\'', value: '\''true'\''},{key: '\''readability-implicit-bool-conversion.AllowPointerConditions'\'', value: '\''true'\''}]}' -export-fixes=/tmp/QtCreator-xVmDux/clangtools-dHKeSE/report-agg_file.cpp-LWXrVV /home/ai/projects/fheroes2/src/engine/agg_file.cpp -- -Wno-unknown-pragmas -Wno-unknown-warning-option -Wno-documentation-unknown-command -w -nostdinc -nostdinc++ -g -std=gnu++11 -fsyntax-only -m64 --target=x86_64-pc-linux-gnu -x c++ -DWITH_DEBUG -DWITH_ICONV -DWITH_IMAGE -DWITH_TTF -I /usr/include/SDL2 -I /home/ai/projects/fheroes2/src/engine -I /home/ai/projects/fheroes2/src/thirdparty/libsmacker -isystem /usr/include/c++/11.1.0 -isystem /usr/include/c++/11.1.0/x86_64-pc-linux-gnu -isystem /usr/include/c++/11.1.0/backward -isystem /usr/local/include -isystem /usr/lib/clang/12.0.1/include -isystem /usr/include
      Process Error: 5
      Output:
      <command-line-config>:1:357: error: Expected , between entries!
      {Checks: '-*,bugprone-bool-pointer-implicit-conversion,modernize-use-bool-literals,readability-implicit-bool-conversion,readability-simplify-boolean-expr,-clang-diagnostic-*', CheckOptions: [{key: 'readability-simplify-boolean-expr.ChainedConditionalAssignment', value: '10'},{key: 'readability-simplify-boolean-expr.ChainedConditionalReturn', value: '10'}{key: 'readability-implicit-bool-conversion.AllowIntegerConditions', value: 'true'},{key: 'readability-implicit-bool-conversion.AllowPointerConditions', value: 'true'}]}
       ^
      Error: invalid configuration specified.
      Invalid argument

      It looks like comma is missing in CheckOptions between options with default and custom values.

      Attachments

        Activity

          People

            kandeler Christian Kandeler
            qarkai Arkadiy Illarionov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: