vale
vale copied to clipboard
Ignore `#!/...` shebang on first line of code files
Check for existing issues
- [X] Completed
Describe the feature
Currently, vale process a #!/... shebang on the first line of a code file as a comment. For example, when run on a Python script with a first line of #!/usr/bin/env python3, vale produces the following error:
1:12 error Use 'environment' rather than RedHat.TermsErrors
'env'.
In terms of being syntax aware, a shebang line should not be considered a comment. Add an exception to the logic that identifies comments to exclude comments starting with !/ if that comment is on the first line.
$ docker compose run --rm vale --version
vale version v2.26.0