Spacemacs: "Flycheck cannot use this syntax checker for this buffer"
Maverobot opened this issue · 2 comments
Maverobot commented
Hello,
I have been trying to include this package in my spacemacs config. I undertook the following steps:
- put
flycheck-clang-analyzer
indotspacemacs-additional-packages
- add the config to
dotspacemacs/user-config
:
(use-package flycheck-clang-analyzer
:ensure t
:after flycheck
:config (flycheck-clang-analyzer-setup))
However, when trying to select clang-analyzer as checker, an error occured:
Syntax checker in buffer hello_world.h in c++-mode:
clang-analyzer
- major mode: `c++-mode' supported
- may enable: yes
- predicate: nil
- executable: Found at /usr/bin/clang
- Backend: flycheck-clang
Flycheck cannot use this syntax checker for this buffer.
Flycheck Mode is enabled. Use SPC u C-c ! x to enable disabled checkers.
--------------------
Flycheck version: 32snapshot (package: 20190311.1422)
Emacs version: 26.1
System: x86_64-pc-linux-gnu
Window system: x
It would be very helpful if someone can shed some light on this issue. Thanks!
alexmurray commented
We purposely disable the checker for header buffers since these often come with a lot of false positives from clang-analyzer. So this is expected behaviour in this case for a hello_world.h
file
Maverobot commented
Amazing, thanks! I don't know why I did not try with a cpp file.