Discussion:
Clang-Tidy integration plugin for KDevelop (kdev-clang-tidy) 0.3.0 released
Friedrich W. H. Kossebau
2018-08-30 09:50:17 UTC
Permalink
Hi,

please welcome the third release of the Clang-Tidy integration plugin for
KDevelop ( https://commits.kde.org/kdev-clang-tidy ).

The plugin provides some very basic features for the start:
* running clang-tidy on a single file, subdirectories or the whole project,
with the result shown in the Problems tool view,
invokable from file context menus and main menu (Analyzer section)
* per-project config UI:
* free field for additional command line parameters to clang-tidy
* checkbox whether to include system headers in the check
* toggle between using .clang-tidy files or options in the config UI:
* header filter regular expression
* opt-in list of checks

See also https://frinring.wordpress.com/2018/08/30/improve-your-cpp-code-in-kdevelop-with-clang-tidy//

This is the third of a quick series of releases following the often-
and-early mantra, giving users already access to what is working now and
allowing them to take part in the feedback loop while extending the
functionality.

NOTE FOR USERS:
Be aware that for now one has to enable the creation of the compilation
database oneself, e.g. with CMake to set the flag
CMAKE_EXPORT_COMPILE_COMMANDS to ON
in the settings (listed under "Advanced values" in the project CMake settings
in KDevelop). The plugin does not (yet) handle that for you.

NOTE FOR PACKAGERS:
The sources of this plugin build against the current stable KDevelop version,
5.2, upcoming stable 5.3 and also master branch. Though will only work with
the version built against (5.2, 5.3 or master).
Also set the CMake flag -DBUILD_TESTING=OFF if kdevelop is built with that.
Best create packages like you do for the tarballs of other separate KDevelop
plugins, like kdev-python & kdev-php (which are released in the KDevelop
release bundle).

Changes since 0.2.0:
* support for running clang-tidy also on more than one file,
either subdirs or the whole project (using parallel jobs optionally)

Download from:
https://download.kde.org/stable/kdev-clang-tidy/0.3.0/src/

sha256:
1da270de22247aa071f3c0ff61a3fbb22e66c1e9e3af18a2405438bdec53a1e1
kdev-clang-tidy-0.3.0.tar.xz

Signed with my PGP key (uploaded to key servers, no-one signed yet)
E191 FD5B E6F4 6870 F09E 82B2 024E 7FB4 3D01 5474
Friedrich W. H. Kossebau <***@kde.org>
kdev-clang-tidy-0.3.0.tar.xz.sig

Bug reports & feature requests:
https://bugs.kde.org/enter_bug.cgi?
format=guided&amp;product=kdevelop&amp;component=Analyzer:%20Clang-Tidy


More info:

Planned features (in rough order of execution):
* warning about missing compilation database
* support for fix-its
* globally defined sets of checks, for reuse between projects and use for
specific code analyze work
* folder-specific clang-tidy settings
* being an editor for .clang-tidy files, for seamless integration between
IDE-based and console-based usage of clang-tidy
* enabling the generation of compilation database by simple button when needed

Long term the kdev-clang-tidy plugin should be added to the kdevelop repo, as
planned before (cmp. https://www.kdevelop.org/news/kdevelop-510-released ).
Currently scheduled to happen for KDevelop 5.4.

Even better though would be somebody implementing integration of this and
other clang-based analyzers directly with the clang-parser of the clang
language plugin, so any warnings and fix-its are delivered as part of the
normal editing. Though this might be more challenging, so the current explicit
analyzer plugins serve as intermediate utilities.

Cheers
Friedrich
Friedrich W. H. Kossebau
2018-08-30 13:39:23 UTC
Permalink
Hi again,

0.3.0 sadly failed to build against KDevelop 5.2 (test environment was broken
and had KDevelop 5.3, not 5.2).

So please instead use the fixed version 0.3.1, if you build against KDevelop
5.2.

Changes since 0.3.0:
* fix build breakage against KDevelop 5.2

Download from:
https://download.kde.org/stable/kdev-clang-tidy/0.3.1/src/

sha256:
171c05f33af92c1827fcf5b6d772b2856a8d495c6816652e35399d681b60ce3b
kdev-clang-tidy-0.3.1.tar.xz

Signed with my PGP key (uploaded to key servers, no-one signed yet)
E191 FD5B E6F4 6870 F09E 82B2 024E 7FB4 3D01 5474
Friedrich W. H. Kossebau <***@kde.org>
kdev-clang-tidy-0.3.1.tar.xz.sig

Cheers
Friedrich
Friedrich W. H. Kossebau
2018-09-02 17:00:19 UTC
Permalink
Hi once more,

happy to see kdev-clang-tidy being picked up by more and more packagers and
users :)

So here another version with yet some build fixes against older versions of Qt
and KDE Frameworks.

So if you build against Qt < 5.7 and/or KDE Frameworks < 5.32, please use the
fixed version 0.3.2, no gain for everyone else, thus need for action.

Changes since 0.3.1:
* fix build breakage against with Qt <5.7 & KF < 5.32

Download from:
https://download.kde.org/stable/kdev-clang-tidy/0.3.2/src/

sha256:
e88683087cdd62fa08d780d664c25e3cf0a630562d1afe2fe143744cdfce5249
kdev-clang-tidy-0.3.2.tar.xz

Signed with my PGP key (uploaded to key servers, no-one signed yet)
E191 FD5B E6F4 6870 F09E 82B2 024E 7FB4 3D01 5474
Friedrich W. H. Kossebau <***@kde.org>
kdev-clang-tidy-0.3.2.tar.xz.sig

Cheers
Friedrich

Loading...