From 7f4bb99bfd92fb0f5403b1b0f11c88110133f967 Mon Sep 17 00:00:00 2001 From: koalaman Date: Sat, 15 Mar 2014 16:15:39 -0700 Subject: [PATCH] Created SC1081 (markdown) --- SC1081.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 SC1081.md diff --git a/SC1081.md b/SC1081.md new file mode 100644 index 0000000..125dbad --- /dev/null +++ b/SC1081.md @@ -0,0 +1,23 @@ +## Scripts are case sensitive. Use 'if', not 'If'. + +### Problematic code: + + If true + Then + echo "hello" + Fi + +### Correct code: + + if true + then + echo "hello" + fi + +### Rationale: + +Shells are case sensitive and do not accept `If` or `IF` in place of lowercase `if`. + +### Contraindications + +If you're aware of this and insist on naming a function `WHILE`, you can quote the name to prevent shellcheck from thinking you meant `while`. \ No newline at end of file