crstlint
cRSTLint
Copyright (C) 2025 Rénich Bon Ćirić
An RST linter implementation built on the crst Crystal shard.
cRSTLint is a command-line tool and Crystal library that provides comprehensive linting capabilities for reStructuredText (RST) documents. It is built as an implementation of the crst parser shard, which provides the core RST parsing functionality.
Features
- RST syntax validation
- Document structure checking
- Unknown directive detection
- Reference validation
- Auto-fix capability for common issues (e.g., trailing whitespace)
- Multiple output formats (human-readable, JSON)
Installation
From Source
-
Clone the repository:
git clone https://gitlab.com/renich/crstlint.git cd crstlint -
Build and install:
make sudo make installBy default, this installs to
/usr/local/bin. To install elsewhere (e.g.,~/.local):make install PREFIX=~/.local -
Or install to your home directory:
make make install-localThis installs to
~/.local/bin. Make sure~/.local/binis in your$PATH.
Usage
Check a single file:
bin/crstlint document.rst
Recursively check a directory:
bin/crstlint --recursive docs/
Automatically fix issues:
bin/crstlint --fix document.rst
JSON output:
bin/crstlint --format json document.rst
Configuration
cRSTLint can be configured using a .crstlintrc.yaml file in your project root. See the included .crstlintrc.yaml for all options.
Development
git config core.hooksPath .githooks # Enable Git hooks
make deps # Install dependencies
make test # Run tests
make lint # Run linting
make build # Build binary
make setup # Full development setup
For detailed architecture documentation, see docs/technical/architecture.rst.
Contributing
Please read CONTRIBUTING.rst for details on our code of conduct, and the process for submitting pull requests.
License
This project is licensed under the GPL-3.0 License - see the LICENSE file for details.
crstlint
- 0
- 0
- 0
- 0
- 2
- 27 days ago
- November 20, 2025
GNU General Public License v3.0 only
Fri, 13 Feb 2026 22:43:39 GMT