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

Please document or link to documentation for .clang-tidy files

    XMLWordPrintable

Details

    • 3
    • c16e205a7712cd0f0d8b68cfcaa7baf41acb368f (qt-creator/qt-creator/4.11)
    • DaVinci X-mas sprint, DaVinci sprint 1, DaVinci sprint 2

    Description

      I want to have the settings stored in the sources of my project, but I have no idea how to write a .clang-tidy file.

      https://doc.qt.io/qtcreator/creator-clang-tools.html#configuring-clang-tools says:

      In the Clang-Tidy tab, select Select Checks to select the checks to perform, Use .clang-tidy Config File to read them from a Clang-Tidy configuration file, or Disable to disable them.

      It would be great if it could link to https://clang.llvm.org/extra/clang-tidy/:

      Configuration files:
      clang-tidy attempts to read configuration for each source file from a
      .clang-tidy file located in the closest parent directory of the source
      file. If any configuration options have a corresponding command-line
      option, command-line option takes precedence. The effective
      configuration can be inspected using -dump-config

      However, even Clang's docs don't provide an example of what a .clang-tidy file looks like. It would be so helpful if the documentation provided an example of a .clang-tidy file with a few checks so that users can learn how to use them.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            leenam Leena Miettinen
            mitch_curtis Mitch Curtis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes