Skip to content

Ignore #!/... shebang on first line of code files #631

@rpatterson

Description

@rpatterson

Check for existing issues

  • 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions