From 7d987c013ebe44038b1ee38c3b2ae8b161ba6921 Mon Sep 17 00:00:00 2001 From: Frank LENORMAND Date: Fri, 27 Mar 2020 10:20:40 +0300 Subject: [PATCH] rc lint: Check the `lintcmd` option is set in `:lint-buffer` Calling `:lint-buffer` when `lintcmd` is empty results in a temporary directory being created, but never removed when the underlying linting code errors out. --- rc/tools/lint.kak | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rc/tools/lint.kak b/rc/tools/lint.kak index 3e25d02f..20875a23 100644 --- a/rc/tools/lint.kak +++ b/rc/tools/lint.kak @@ -277,6 +277,12 @@ define-command \ } \ lint-buffer \ %{ + evaluate-commands %sh{ + if [ -z "${kak_opt_lintcmd}" ]; then + echo 'fail The lintcmd option is not set' + exit 1 + fi + } evaluate-commands -draft %{ execute-keys '%' lint-cleaned-selections %opt{lintcmd}