Fixing naming issues automatically
The real power of Clang-Tidy lies in its ability to not just identify issues but also to rectify them automatically. Manual fixes can be time-consuming and error-prone, making automation incredibly valuable in a fast-paced development environment. Fortunately, Clang-Tidy excels in this area. Most of the fixes suggested by the tool can be applied automatically, saving you countless hours of manual labor and potential errors. To apply these automatic fixes, simply run make clang-tidy
in your terminal. The tool will scan the code for violations, and where possible, it will automatically correct the code so that it aligns with your configured guidelines:
#include <string> #include <vector> namespace filesystem { // CamelCase instead of lower_case enum class Permissions : uint8_t { READ, WRITE, EXECUTE }; struct User { std::string name; // redundant suffix _ for public member int id = 0; ...