[cfe-dev] How to run/create tests for a clang-tidy check

Daniel Marjamäki Daniel.Marjamaki at evidente.se
Mon Jun 8 01:20:50 PDT 2015


Hello!

> Is there documentation on how to run and create tests for clang-tidy
> checks? I've found some .cpp test files and a shell script in the tests
> folder but can't run it in a useful way.

I recommend using the script  llvm/tools/clang/tools/extra/clang-tidy/add_new_check.py

$ python add_new_check.py misc awesome-functions

This will add a "awesome-functions" checker in the misc module. A testfile is added also.

> I recall seeing a list of clang-tidy checks in development but I can't find
> it any more, does a anyone have a link?

I don't know if there is such a list for clang-tidy. I have seen such a list for the static analyser.

Best regards,
Daniel Marjamäki

..................................................................................................................
Daniel Marjamäki Senior Engineer
Evidente ES East AB  Warfvinges väg 34  SE-112 51 Stockholm  Sweden

Mobile:                 +46 (0)709 12 42 62
E-mail:                 Daniel.Marjamaki at evidente.se

www.evidente.se




More information about the cfe-dev mailing list