Leading spaces before the shebang (#!) can prevent the script from executing properly. To ensure correct script execution, the shebang must be placed at the very beginning of the file without any preceding whitespace.
1
2# Noncompliant: Leading spaces before the shebang.
3 #!/bin/bash
4echo "Hello Shell"1
2# Compliant: Shebang starts at the very first character of the line.
3#!/bin/bash
4echo "Hello Shell"