[Qt-creator] What are your favorite clang-tidy checks

Michael Jackson mike.jackson at bluequartz.net
Thu Jun 14 23:19:36 CEST 2018


Can I just have it blanket fix ALL issues that it finds in a file? Kind of like “Clang Format” but for Clang-Tidy? I have been toying with writing a script that would attempt to do that for our code base.

 

I guess I should download the latest QtCreator and give that a spin.

--

Mike Jackson

 

On 6/14/18, 12:55 PM, "Ivan Donchevskii" <ivan.donchevskii at qt.io> wrote:

 

Yes, there are checkboxes for fix-its so you can apply selected ones.

 

From: Vadim Peretokin <vperetokin at gmail.com>
Sent: Thursday, June 14, 2018 6:42 PM
To: Ivan Donchevskii
Cc: Michael Jackson; qt-creator at qt-project.org
Subject: Re: [Qt-creator] What are your favorite clang-tidy checks 

 

That's a great addition! Can it also run fixits?

On Thu, 14 Jun 2018, 6:10 pm Ivan Donchevskii, <ivan.donchevskii at qt.io> wrote:

In Qt Creator 4.7 there's a separate tool (Analyze menu) that runs Clang-Tidy checks over the selected files which does not affect your opened documents. I hope it solves your problem at least partially :)

From: Qt-creator <qt-creator-bounces+ivan.donchevskii=qt.io at qt-project.org> on behalf of Michael Jackson <mike.jackson at bluequartz.net>
Sent: Thursday, June 14, 2018 6:03:37 PM
To: qt-creator at qt-project.org


Subject: Re: [Qt-creator] What are your favorite clang-tidy checks

 

I tend to go back and forth between turning it off so that code completion actually completes in a reasonable amount of time (~1 second) or having all the helpful insights into my code base. It is almost like QtCreator needs to have 2 threads running. One for the code completion and one for the clang-tidy stuff.

 

--

Mike Jackson

 

On 6/13/18, 3:44 AM, "Qt-creator on behalf of Ivan Donchevskii" <qt-creator-bounces+mike.jackson=bluequartz.net at qt-project.org on behalf of ivan.donchevskii at qt.io> wrote:

 

Hi!

 

On the contributors summit I mentioned that we want to introduce the "default" set of flags for Clang-Tidy which can be used as a starting point for analysis and is good enough for some random project developed in Qt Creator.

We have an example of it in https://codereview.qt-project.org/#/c/230400/ but not sure if it is actually the proper list.

 

Here's the list itself - "bugprone-*,cppcoreguidelines-*,misc-*,modernize-*,performance-*,readability-*,-cppcoreguidelines-owning-memory,-readability-braces-around-statements,-readability-implicit-bool-conversion,-readability-named-parameter"

 

Let us know if there's something you would like to add or remove from it. You can check the whole tree of currently available checks in 4.7 beta or in one of our latest Qt Creator snapshots.

 

Kind regards,

Ivan

_______________________________________________ Qt-creator mailing list Qt-creator at qt-project.org http://lists.qt-project.org/mailman/listinfo/qt-creator 

_______________________________________________
Qt-creator mailing list
Qt-creator at qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20180614/335a5b96/attachment.html>


More information about the Qt-creator mailing list