From c2081b76647c7d3cca85790ab858bbc94083582b Mon Sep 17 00:00:00 2001 From: koalaman Date: Tue, 6 Sep 2016 21:02:33 -0700 Subject: [PATCH] Destroyed SC2131 (markdown) --- SC2131.md | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 SC2131.md diff --git a/SC2131.md b/SC2131.md deleted file mode 100644 index e87ddce..0000000 --- a/SC2131.md +++ /dev/null @@ -1,24 +0,0 @@ -## This format string has 2 variables, but is passed 1 arguments. - -### Problematic code: - -```sh -printf "Hello %s, welcome to %s.\n" "$USER" -``` - -### Correct code: - -```sh -printf "Hello %s, welcome to %s.\n" "$USER" "$HOSTNAME" -``` -### Rationale: - -ShellCheck has noticed that you're using a `printf` format string with more `%s` variables than arguments to fill them. - -In the problematic example case, the last `%s` will just become an empty string each time. - -You should either remove the unused variables from the format string, or add enough arguments to fill them. - -### Exceptions: - -None. \ No newline at end of file