[PATCH 2/3] Makefile: shut up about SC1117 and SC2207 in shellcheck
Jani Nikula
jani.nikula at linux.intel.com
Thu Apr 26 16:14:57 UTC 2018
On Thu, 26 Apr 2018, Daniel Vetter <daniel.vetter at ffwll.ch> wrote:
> Not sure how this happened, but we gained a lot of errors. I think we should
> exclude these two since we have lots of them:
shellcheck --version?
I'm on 0.4.4, no errors reported on current git.
BR,
Jani.
>
> SC1117: Backslash is literal in "\n". Prefer explicit escaping: "\\n".
>
> These happen in lots of our strings (especially anything we feed to grep).
>
> SC2207: Prefer mapfile or read -a to split command output (or quote to avoid splitting).
>
> Our bash_completion scripts are full of these - everywhere we call compgen.
>
> Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> ---
> Makefile | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index 51e1d42488b0..3d57f3e62ed7 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -43,8 +43,10 @@ SC_EXCLUDE := \
> -e SC2046 \
> -e SC2086 \
> -e SC2115 \
> + -e SC1117 \
> -e SC2119 \
> - -e SC2120
> + -e SC2120 \
> + -e SC2207
>
> shellcheck:
> shellcheck $(SC_EXCLUDE) dim bash_completion qf
--
Jani Nikula, Intel Open Source Technology Center
More information about the dim-tools
mailing list