-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Charlie Marsh
authored
Aug 10, 2022
1 parent
d6b4623
commit 36efdfe
Showing
5 changed files
with
221 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,56 @@ | ||
# rust-python-linter | ||
|
||
A [Pyflakes](https://github.com/PyCQA/pyflakes)-inspired Python linter, written in Rust. | ||
A performance-focused, [Pyflakes](https://github.com/PyCQA/pyflakes)-inspired Python linter, written | ||
in Rust. | ||
|
||
Supports: | ||
Features: | ||
|
||
- Python 3.10 | ||
- True parallelism | ||
- Python 3.10 compatibility | ||
- [ESLint](https://eslint.org/docs/latest/user-guide/command-line-interface#caching)-inspired | ||
caching | ||
cache semantics | ||
- [TypeScript](https://www.typescriptlang.org/docs/handbook/configuring-watch.html) | ||
-inspired `--watch` semantics | ||
|
||
## Installation | ||
|
||
Available as [`rust-python-linter`](https://pypi.org/project/rust-python-linter/) on PyPI: | ||
|
||
```shell | ||
pip install rust-python-linter | ||
``` | ||
|
||
## Usage | ||
|
||
To run the linter, try any of the following: | ||
|
||
```shell | ||
rust_python_linter path/to/code/to/check.py | ||
# ...or... | ||
rust_python_linter path/to/code/ | ||
# ...or... | ||
rust_python_linter path/to/code/*.py | ||
``` | ||
|
||
You can also run in `--watch` mode to automatically re-run the linter on-change with, e.g.: | ||
|
||
```shell | ||
rust_python_linter path/to/code/ --watch | ||
``` | ||
|
||
## Development | ||
|
||
As the name suggests, `rust-python-linter` is implemented in Rust: | ||
|
||
```shell | ||
cargo fmt | ||
cargo clippy | ||
cargo run resources/test/src | ||
``` | ||
|
||
## Deployment | ||
|
||
`rust-python-linter` is released for Python using [`maturin`](https://github.com/PyO3/maturin): | ||
|
||
```shell | ||
maturin publish | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[build-system] | ||
requires = ["maturin>=0.13,<0.14"] | ||
build-backend = "maturin" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters