tidyfox/README.md

1.2 KiB

tidyfox

outfoxxed's clang-tidy lint collection. Lints I end up needing will go here.

Installation

There is a nix package in default.nix which can be used to install tidyfox in lib/libtidyfox.so.

If you aren't running nix, use the provided Justfile. Run just release to make a release build. You must have llvm and clang 16 dev packages in $PATH. (FindClang.cmake must exist)

Usage

Tidyfox lints are supplied under the tidyfox- namespace. The plugin can be loaded via clang-tidy -load=/path/to/libtidyfox.so.

Lints

tidyfox-explicit-thisptr - requires that this-> is used unconditionally for class members.

Contributing

There is a shell.nix file which will load all the necessary dependencies. If not using nix the requirements are the same as in Installation above.

Run just build to create a debug build and a clang compilation database.

Run just fmt to format the sources.

Run just lint to run clang-tidy on tidyfox, with tidyfox itself as a plugin.

Run just release to create a release build.

Run just pre-commit before committing to catch anything.

When committing, follow conventional commits.