From 7f601052c4acb4788ff4b03ce3bab2c85e4db556 Mon Sep 17 00:00:00 2001 From: Fabio Leimgruber Date: Sat, 22 Jul 2017 20:30:05 +0200 Subject: [PATCH] Coala command: use --limit-files Uses `--limit-files` instead of `--files`. Also, additional line-start and line-end regexp patterns. coafile: Ignore for gitmate CI and include for ert. --- .coafile | 5 ++--- flycheck-coala.el | 8 ++++---- test/resources/language/.coafile | 3 +++ 3 files changed, 9 insertions(+), 7 deletions(-) create mode 100644 test/resources/language/.coafile diff --git a/.coafile b/.coafile index 274d548..0648ded 100644 --- a/.coafile +++ b/.coafile @@ -1,8 +1,7 @@ -[Default] -enabled = True - [commit] bears = GitCommitBear [python] bears = PEP8Bear +files = **.py +ignore = test/resources/language/*.py diff --git a/flycheck-coala.el b/flycheck-coala.el index 27ec81e..270f3c7 100644 --- a/flycheck-coala.el +++ b/flycheck-coala.el @@ -34,10 +34,10 @@ (flycheck-define-checker coala "A checker using coala. See URL `https://coala.io'." - :command ("coala" "--format" "{line}:{column}:{severity_str}:{message}" "--find-config" "--files" source) - :error-patterns ((error (or "None" line) ":" (or "None" column) ":MAJOR:" (message)) - (warning (or "None" line) ":" (or "None" column) ":NORMAL:" (message)) - (info (or "None" line) ":" (or "None" column) ":INFO:" (message))) + :command ("coala" "--format" "{line}:{column}:{severity_str}:{message}" "--find-config" "--limit-files" source-original) + :error-patterns ((error line-start (or "None" line) ":" (or "None" column) ":MAJOR:" (message) line-end) + (warning line-start (or "None" line) ":" (or "None" column) ":NORMAL:" (message) line-end) + (info line-start (or "None" line) ":" (or "None" column) ":INFO:" (message) line-end)) :modes (c-mode csharp-mode c++-mode diff --git a/test/resources/language/.coafile b/test/resources/language/.coafile new file mode 100644 index 0000000..067bc73 --- /dev/null +++ b/test/resources/language/.coafile @@ -0,0 +1,3 @@ +[python] +bears = PEP8Bear +files = *.py