From 7ef9975da7299e6ee3e3b5e48712c98805aad1f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=B8=AA=E0=B8=A1=E0=B8=B2=E0=B8=99=E0=B9=80=E0=B8=9E?= =?UTF-8?q?=E0=B8=8A=E0=B8=A3=E0=B8=98=E0=B8=B9=E0=B8=9B=E0=B8=88=E0=B8=B1?= =?UTF-8?q?=E0=B8=99=E0=B8=97=E0=B8=A3=E0=B9=8C0101?= <56212621+7040934@users.noreply.github.com> Date: Wed, 20 Nov 2019 00:45:04 +0700 Subject: [PATCH] Destroyed Parser error (markdown) --- Parser-error.md | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 Parser-error.md diff --git a/Parser-error.md b/Parser-error.md deleted file mode 100644 index 6551525..0000000 --- a/Parser-error.md +++ /dev/null @@ -1,34 +0,0 @@ -This page is about how ShellCheck reports parser errors, to aid you in finding problems. If you're getting a parser error for code you know or think is correct, you should [submit a bug](https://github.com/koalaman/shellcheck/issues/new) with an example! - -When ShellCheck is unable to parse a file, it'll output several errors to help pinpoint the problem: - -Consider this script, with a missing double quote on line 1: - - 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: - - In file line 1: - ssh host "$cmd - ^-- SC1009: The mentioned parser error was in this simple command. - - In file line 2: - echo "Finished" - ^-- SC1073: Couldn't parse this double quoted string. - ^-- SC1072: Unexpected eof. Fix any mentioned problems and try again. - - -1. One error showing the direct problem (SC1072, unexpected eof) *(Note: see [#1036](../issues/1036))* -1. One error showing the construct being parsed (SC1073) -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. - -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