From 04345336af42b7e1fc482b21fc9df0129faa11a5 Mon Sep 17 00:00:00 2001 From: Vidar Holen Date: Sat, 7 Dec 2019 16:23:18 -0800 Subject: [PATCH] Updated SC2230 (markdown) --- SC2230.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SC2230.md b/SC2230.md index 3e9be5d..068e6be 100644 --- a/SC2230.md +++ b/SC2230.md @@ -1,5 +1,7 @@ ## which is non-standard. Use builtin 'command -v' instead. +Note: This check is opt-in only in ShellCheck 0.7.1+ (`shellcheck -o deprecate-which`). + ### Problematic code: ```sh @@ -18,7 +20,7 @@ command -v grep ### Exceptions: -None +This check is opt-in only in 0.7.1+, and you may choose to [[ignore it]] in earlier versions. `which` is very common, and some prefer its executable-or-nothing behavior over `command -v`'s handling of builtins, functions and aliases. ### Caveats: