mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 11:19:45 +08:00
Updated SC2230 (markdown)
@@ -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:
|
||||
|
||||
|
Reference in New Issue
Block a user