Jump to content

Infrastructure/GitLab/CI/Static Code Analysis

From KDE Community Wiki
Revision as of 20:07, 6 September 2020 by Dvratil (talk | contribs) (Initial draft of the page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Motivation

Static code analysis is a helpful tool to improve and keep high level of code quality. Static code analyzer inspects the source code and looks for issues like wrong usage of some API, bugprone statements, potential performance issues and many others. The static analyzers available on our KDE instance of GitLab are clazy and clang-tidy. Since both of those analyzers are based on the clang C++ compiler, the issues the analyzers find are reported as regular compiler warnings.

Setting up

  1. .gitlab-ci.yml
  2. basic content
  3. TODO

Frameworks, Applications and Extragear projects

TODO

Playground/Miscellaneous projects

TODO


Customizing the static analyzer jobs

TODO

Clazy

Intro TODO

Configuring Clazy

TODO

Supressing warnings

TODO

Clang-tidy

Intro TODO

Configuring Clang-tidy

TODO

Supressing warnings

TODO