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

Friedrich W. H. Kossebau kossebau at kde.org
Tue Aug 7 21:04:46 BST 2018


Hi,

please welcome the initial 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 should be the first 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 (and also master). Though will only work with the version built against 
(5.2 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).

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

sha256:
    a2c889105635ffc3ce339ea3741a35e71d5b94108a066ddf84db20b90f07ee37
    kdev-clang-tidy-0.1.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.1.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 ).

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 Kde-announce-apps mailing list