diff --git a/SC1059.md b/SC1059.md new file mode 100644 index 0000000..3c3ee7b --- /dev/null +++ b/SC1059.md @@ -0,0 +1,34 @@ +## Semicolon is not allowed directly after 'do'. You can just delete it. + +### Problematic code: + +```sh +while true; do; true; done + +while true; +do; + true; +done; +``` + +### Correct code: + +```sh +while true; do true; done + +while true; +do + true; +done; +``` +### Rationale: + +Semicolon `;` is not allowed directly after a `do` keyword. Follow it directly with either a command or a linefeed as shown in the example. + +### Exceptions: + +None. + +### Related resources: + +* Help by adding links to BashFAQ, StackOverflow, man pages, POSIX, etc! \ No newline at end of file