From d883aab05f1d432cd3691d23b4744bd9151545f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Wed, 7 Aug 2019 10:12:25 +0200 Subject: [PATCH] Update the flycheck configuration for gcc and cppcheck --- .dir-locals.el | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.dir-locals.el b/.dir-locals.el index dcfce209ac..4d29787c6d 100644 --- a/.dir-locals.el +++ b/.dir-locals.el @@ -61,6 +61,7 @@ (eval setq flycheck-clang-include-path include-directories) (eval setq flycheck-cppcheck-include-path include-directories) + (eval setq flycheck-gcc-include-path include-directories) (eval setq flycheck-clang-args (list "-include" @@ -68,5 +69,20 @@ (concat directory-of-current-dir-locals-file "config.h")) ) ) + (eval setq flycheck-gcc-args + (list + "-include" + (expand-file-name + (concat directory-of-current-dir-locals-file "config.h")) + ) + ) + (eval setq flycheck-cppcheck-args + (list + "--enable=all" + "--suppress=missingIncludeSystem" + (concat "-include=" (expand-file-name + (concat directory-of-current-dir-locals-file "config.h"))) + ) + ) ) ))