Clang-Tidy integration plugin for KDevelop (kdev-clang-tidy) 0.2.0 released

Friedrich W. H. Kossebau kossebau at kde.org
Wed Aug 22 23:38:30 BST 2018


Hi,

please welcome the second 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, with result shown in Problems toolview,
  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

This is the second 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). 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.1.0:
* tree-like display of checks in the config UI, to allow selection of groups
  (matching the wildcard/masking logic of the clang-tidy -checks= parameter)

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

sha256:
    a1400b38ac7e0eb335778d73adc6ffd393cf35a81fab6357cd86185664a2f1cf
    kdev-clang-tidy-0.2.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 <kossebau at kde.org>
    kdev-clang-tidy-0.2.0.tar.xz.sig

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


More info:

Planned features (in rough order of execution):
* tree-like display of checks in the config UI, to allow selection of groups
  (matching the wildcard/masking logic of the clang-tidy -checks= parameter)
* warning about missing compilation database
* support for fix-its
* running on more than one file, e.g. the whole project
* 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





More information about the KDevelop mailing list