From 55de550a4be6d7a473df99e0bc44cef02404e72f Mon Sep 17 00:00:00 2001 From: Vidar Holen Date: Wed, 19 Oct 2022 20:12:26 -0700 Subject: [PATCH] Created SC1027 (markdown) --- SC1027.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 SC1027.md diff --git a/SC1027.md b/SC1027.md new file mode 100644 index 0000000..7410fd5 --- /dev/null +++ b/SC1027.md @@ -0,0 +1,24 @@ +## Expected another argument for this operator. + +### Problematic code: + +```sh +[ $a -ne ] +``` + +### Correct code: + +```sh +[ $a -ne $b ] +``` +### Rationale: + +ShellCheck found a `test` operator without an operand. This could be a copy-paste fail, bad linebreak, or trying to use `<>` instead of `!=` or `-ne`. + +### Exceptions: + +None. + +### Related resources: + +* Help by adding links to BashFAQ, StackOverflow, man pages, POSIX, etc! \ No newline at end of file