Skip to main content

Linter

Brief​

There are a lot of bugs and bad coding habits that can be caught by tools. It can really help you a lot to improve the quality of your code! clang-tidy is a great one and I would recommend using it.

Installing​

You simple need to have clangd set up.

To configure the behaviour of clang-tidy you need to have a .clang-tidy file at the root of your project. You can use mine as a starting point.

Once that is done you should see warnings popping up inside your IDE:

clang-tidy

Also note the "Quick Fix... (Ctrl+;)" option: sometimes clang-tidy is even capable of fixing the problem for you automatically!