How to run/create tests for a clang-tidy check

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 recall seeing a list of clang-tidy checks in development but I can’t find it any more, does a anyone have a link?

Thanks,

Jon

In article <CAAbBDD9z5hy7MAPuqcmOK1W9LqgY0QA613hqP2xHe2QShLUgXA@mail.gmail.com>,
    Jonathan Coe <jbcoe@me.com> writes:

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've been using the existing mechanisms to run FileCheck based tests
for my enhancements to clang-tidy.

The target check-clang-tools will build all the tools and run their
tests; it's what I use in my TDD cycle.

There is also the possibility of running unit tests, but I've focused
more on the end-to-end style tests instead of unit tests.

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?

What I've got in development:
- redundant include check
- redundant forward declaration check
- redundant (void) argument list check

What I've contributed and continue to enhance:
- simplify boolean expression

Heya,

There’s a whole lot of information about testing checks in the “Testing Checks” paragraph on http://clang.llvm.org/extra/clang-tidy.html

Cheers