So my question is like in title. I want to turn off flycheck minor mode for all files in directory. I have specified in my .emacs file that it should be on in c++-mode, c-mode and few others, but I don't want this rule to apply to one given directory.
Preferably I'd like to turn it off using .dir-locals.el file. My knowledge of lisp code is very limited and since specyfying
(remove-hook 'c++-mode-hook 'flycheck-mode) hasn't done anything, I don't really know what should I do to get the effect I want.
Well you wouldn't want to remove the hook, as that's a global effect.
You can disable the mode on a per-buffer basis, though. Use the
eval pseudo-variable. e.g. a
.dir-locals.el like this would act for any/all major modes:
((nil . ((eval . (flycheck-mode 0)))))
Local variables are processed after mode hooks, so this should reliably counteract your existing code (n.b. I've not tested this).