Details
-
Bug
-
Resolution: Done
-
P2: Important
-
Qt Creator 4.11.0-beta2
-
None
-
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
For Gerrit Dashboard: QTCREATORBUG-23223 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
284902,2 | Doc: Describe saving Clang-Tidy configuration as a file | 4.11 | qt-creator/qt-creator | Status: MERGED | +2 | 0 |