| Crates.io | pep257 |
| lib.rs | pep257 |
| version | 0.2.0 |
| created_at | 2025-10-22 13:02:49.125341+00 |
| updated_at | 2025-12-17 05:15:52.644169+00 |
| description | PEP 257 docstring style checker for Rust code |
| homepage | |
| repository | https://github.com/jayvdb/pep257-rs |
| max_upload_size | |
| id | 1895636 |
| size | 182,065 |
A Rust tool that uses tree-sitter to parse Rust files and check that documentation comments (docstrings) follow Python's PEP 257 conventions as much as possible within the context of Rust code.
///, /** */, and #[doc = "..."]cargo install pep257
Or install from the repository:
cargo install --git https://github.com/jayvdb/pep257-rs
Or build from source:
git clone https://github.com/jayvdb/pep257-rs
cd pep257-rs
cargo build --release
# Check current directory
pep257 check
# Check a specific file
pep257 check src/main.rs
# Check with warnings
pep257 check --warnings
# JSON output
pep257 check --format json
For detailed usage and all available options, see HELP.md.
For a complete list of supported options, run:
pep257 --help
src/main.rs:1:1 error [D403]: First word of the first line should be properly capitalized
src/main.rs:1:1 error [D400]: First line should end with a period
src/main.rs:15:1 error [D100]: Missing docstring in public function
pep257 check src/
The tool exits with a non-zero status if violations are found (use
--no-fail to override).
Contributions are welcome! Please ensure:
cargo testcargo clippytools/tidy.shMIT License - see the LICENSE file for details.