My clang-tidy lint collection
Find a file
2023-10-27 04:19:45 -07:00
src chore: rename ExplicitThisptr files to uppercase 2023-10-27 03:57:09 -07:00
.clang-format initial setup 2023-10-27 03:03:57 -07:00
.clang-tidy initial setup 2023-10-27 03:03:57 -07:00
.editorconfig initial setup 2023-10-27 03:03:57 -07:00
.gitignore initial setup 2023-10-27 03:03:57 -07:00
CMakeLists.txt chore: rename ExplicitThisptr files to uppercase 2023-10-27 03:57:09 -07:00
default.nix initial setup 2023-10-27 03:03:57 -07:00
Justfile fix: only run clang-tidy on .cpp files 2023-10-27 04:19:45 -07:00
package.nix initial setup 2023-10-27 03:03:57 -07:00
README.md feat: add tidyfox-explicit-thisptr 2023-10-27 03:10:01 -07:00
shell.nix initial setup 2023-10-27 03:03:57 -07:00

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.