Development/ClangTidy

Clang-tidy's main documentation lives here: clang-tidy-docs

In order to use clang-tidy in LibreOffice:

to generate the necessary compilation database that clang-tidy will use {    Checks: '-*,modernize-use-auto' } This file is interpreted as a comma-separated list of clang-tidy checks to turn on and off. The first part '-*' disables all of the default checks. And the second part 'modern-use-auto', will enable the check that converts code to use auto.
 * you need to be able to build LibreOfffice from source
 * run the command
 * create a .clang-tidy file in the root folder of the LibreOffice source tree. This is a JSON-formatted file, which contains stuff like

Note that this fixing process is not 100% reliable and might need some hand editing. ~clang-tidy -list-checks -checks=*
 * To run clang-tidy over the source, I use a shell script like:
 * the -fix parameter will (if the check supports it) attempt to automatically fix the code instead of just warning about it.
 * A useful command to see all of the checks that your version of clang-tidy supports is: