diff --git a/SC1052.md b/SC1052.md new file mode 100644 index 0000000..d55f21c --- /dev/null +++ b/SC1052.md @@ -0,0 +1,22 @@ +## Don't put semicolons directly after 'then'. + +### Problematic code: + +```sh +if true; then; echo "Hi"; fi +``` + +### Correct code: + +```sh +if true; then echo "Hi"; fi +``` +### Rationale: + +`then` keywords should not be followed by semicolons. It's not valid shell syntax. + +You can follow them directly with a line break or another command. + +### Exceptions: + +None \ No newline at end of file