Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. QTCreator & Clang-Tidy : configuration file and command line
Forum Updated to NodeBB v4.3 + New Features

QTCreator & Clang-Tidy : configuration file and command line

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
3 Posts 2 Posters 1.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    GoblE
    wrote on 20 Nov 2019, 13:34 last edited by
    #1

    Hi,

    I use Clang-Tidy with QtCreator, I'm very happy with it, integration into QTCreator is very nice :)
    Today I use pre-selected checks but I want to change this point and I would like to have all checks to do from a file.
    I saw in the configuration window that we can use ".clang-tidy config file", but I can't find more information about it. In the documentation :

    "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."
    

    How can I provide file path to my QT project ? with a variable ? with qmake configuration ?

    An other point : I would like to launch the clang-tidy test outside QTCreator (I have script to build my apps), is there a simple method to do that ? (I found a script from an other member of this forum, but he doesn't use clang and environment provided with QTCreator)

    Thanks for your help.

    A 1 Reply Last reply 21 Nov 2019, 05:31
    0
    • G GoblE
      20 Nov 2019, 13:34

      Hi,

      I use Clang-Tidy with QtCreator, I'm very happy with it, integration into QTCreator is very nice :)
      Today I use pre-selected checks but I want to change this point and I would like to have all checks to do from a file.
      I saw in the configuration window that we can use ".clang-tidy config file", but I can't find more information about it. In the documentation :

      "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."
      

      How can I provide file path to my QT project ? with a variable ? with qmake configuration ?

      An other point : I would like to launch the clang-tidy test outside QTCreator (I have script to build my apps), is there a simple method to do that ? (I found a script from an other member of this forum, but he doesn't use clang and environment provided with QTCreator)

      Thanks for your help.

      A Offline
      A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on 21 Nov 2019, 05:31 last edited by
      #2

      Hi @GoblE,

      AFAIK that file has to be put in the root folder of your project.

      Regards

      Qt has to stay free or it will die.

      1 Reply Last reply
      1
      • G Offline
        G Offline
        GoblE
        wrote on 26 Nov 2019, 13:33 last edited by GoblE
        #3

        Hi @GoblE,
        AFAIK that file has to be put in the root folder of your project.
        Regards

        Ok, You're right, in fact I did a mistake while I tested it. Thanks.

        EDIT : I found documentation with more information about it :

        --config=<string>              -
                                           Specifies a configuration in YAML/JSON format:
                                             -config="{Checks: '*',
                                                       CheckOptions: [{key: x,
                                                                       value: y}]}"
                                           When the value is empty, clang-tidy will
                                           attempt to find a file named .clang-tidy for
                                           each source file in its parent directories.
        

        Unfortunately we can't be able to choose path of this file.

        Last point, have you an idea about this :

        I would like to launch the clang-tidy test outside QTCreator (I have script to build my apps), is there a simple method to do that ? (I found a script from an other member of this forum, but he doesn't use clang and environment provided with QTCreator)
        

        Thanks for your help.

        1 Reply Last reply
        0

        1/3

        20 Nov 2019, 13:34

        • Login

        • Login or register to search.
        1 out of 3
        • First post
          1/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved