I tried to use readability-isolate-declaration check in clang-tidy, but nothing fixed. Example of code from test.cpp file:
void f() {
int a = 0, b = 1, c = 2;
}
What I've done:
clang-tidy -checks='readability-isolate-declaration' -fix test.cpp
Output:
Error while trying to load a compilation database:
Could not auto-detect compilation database for file "test.cpp"
No compilation database found in /home/anzipex/Downloads/clang-test or any parent directory
fixed-compilation-database: Error while opening fixed database: No such file or directory
json-compilation-database: Error while opening JSON database: No such file or directory
Running without flags.
question from:https://stackoverflow.com/questions/65934459/why-clang-tidy-readability-isolate-declaration-not-fixing-code