ch1bo / flycheck-clang-tidy

Flycheck syntax checker using clang-tidy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

flycheck-clang-tidy-find-default-directory should raise an error, not print a message

cpitclaudel opened this issue · comments

I tried running flycheck-clang-tidy without a config file, and I got the following message:

if: :working-directory Unable to find config file for c/c++-clang-tidy, you need to create .clang-tidy file in your project root of syntax checker c/c++-clang-tidy does not exist

This is because flycheck-clang-tidy-find-default-directory uses message, which returns a string, instead of raising an error.

commented

I believe the new method of finding the project root (a9355cc) fixes this issue.

It first tries to get it from projectile, then tries the version control root dir, then looks for .clang-tidy and if it still hasn't found it, the current directory is used. If the directory is wrong, you'll get an error from clang-tidy.