-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement flake8-executable
#2024
Labels
plugin
Implementing a known but unsupported plugin
Comments
charliermarsh
pushed a commit
that referenced
this issue
Jan 20, 2023
Tracking issue: #2024 Implementation for EXE003, EXE004 and EXE005 of `flake8-executable` (shebang should contain "python", not have whitespace before, and should be on the first line) Please take in mind that this is my first rust contribution. The remaining EXE-rules are a combination of shebang (`lines.rs`), file permissions (`fs.rs`) and if-conditions (`ast.rs`). I was not able to find other rules that have interactions/dependencies in them. Any advice on how this can be best implemented would be very welcome. For autofixing `EXE005`, I had in mind to _move_ the shebang line to the top op the file. This could be achieved by a combination of `Fix::insert` and `Fix::delete` (multiple fixes per diagnostic), or by implementing a dedicated `Fix::move`, or perhaps in other ways. For now I've left it out, but keen on hearing what you think would be most consistent with the package, and pointer where to start (if at all). --- If you care about another testimonial: `ruff` not only helps staying on top of the many excellent flake8 plugins and other Python code quality tools that are available, it also applies them at baffling speed. (Planning to implement it soon for github.com/pandas-profiling/pandas-profiling (as largest contributor) and github.com/ing-bank/popmon.)
This can probably be closed now if |
Good call. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
EXE001
: Shebang is present but the file is not executable.EXE002
: The file is executable but no shebang is present.EXE003
: Shebang is present but does not contain "python".EXE004
: There is whitespace before shebang.EXE005
: There are blank or comment lines before shebang.Tracking issue for
flake8-executable
:(Plugin would already be relevant for
scripts/
)The text was updated successfully, but these errors were encountered: