diff --git a/Parser-error.md b/Parser-error.md index 6551525..ab8334c 100644 --- a/Parser-error.md +++ b/Parser-error.md @@ -4,15 +4,17 @@ When ShellCheck is unable to parse a file, it'll output several errors to help p Consider this script, with a missing double quote on line 1: - ssh host "$cmd - echo "Finished" +```sh +ssh host "$cmd +echo "Finished" +``` Bash says: file: line 2: unexpected EOF while looking for matching `"' file: line 3: syntax error: unexpected end of file -Shellcheck says: +ShellCheck says: In file line 1: ssh host "$cmd @@ -29,6 +31,6 @@ Shellcheck says: 1. One info showing the outer construct being parsed (SC1009) 1. Potentially some specific suggestions, such as when missing an `fi`. -Here, shellcheck says that the command on line 1 is faulty, which makes it easier to find and fix the actual problem. +Here, ShellCheck says that the command on line 1 is faulty, which makes it easier to find and fix the actual problem. -Most of ShellCheck's functionality (specifically, any checks with code >= SC2000) only applies to scripts that parse successfully, so make sure to rerun ShellCheck after fixing any syntax errors. \ No newline at end of file +Most of ShellCheck's functionality (specifically, any checks with code >= SC2000) only applies to scripts that parse successfully, so make sure to rerun ShellCheck after fixing any syntax errors.