https://github.com/lgtm-hq/py-lintro
Making linters play nice... Mostly.
https://github.com/lgtm-hq/py-lintro
ci-cd cli code-quality docker docker-compose formatter github-actions linter linting python sbom static-analysis
Last synced: 4 months ago
JSON representation
Making linters play nice... Mostly.
- Host: GitHub
- URL: https://github.com/lgtm-hq/py-lintro
- Owner: lgtm-hq
- License: mit
- Created: 2025-03-12T10:54:21.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2026-03-03T08:10:31.000Z (4 months ago)
- Last Synced: 2026-03-03T10:07:41.296Z (4 months ago)
- Topics: ci-cd, cli, code-quality, docker, docker-compose, formatter, github-actions, linter, linting, python, sbom, static-analysis
- Language: Python
- Homepage: https://lgtm-hq.github.io/py-lintro/
- Size: 5.53 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 69
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: docs/contributing.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Security: .github/SECURITY.md
- Governance: GOVERNANCE.md
- Dco: DCO.md
Awesome Lists containing this project
README
# Lintro
A comprehensive CLI tool that unifies various code formatting, linting, and quality
assurance tools under a single command-line interface.
## ๐ Quick Start
```bash
uv pip install lintro # Install (or: pip install lintro)
lintro check . # Find issues (alias: chk)
lintro format . # Fix issues (alias: fmt)
lintro check --output-format grid # Beautiful output
```
## โจ Why Lintro?
- **๐ฏ Unified Interface** - One command for all your linting and formatting tools
- **๐ Consistent Output** - Beautiful, standardized output formats across all tools
- **๐ง Auto-fixing** - Automatically fix issues where possible
- **๐ณ Docker Ready** - Run in isolated containers for consistent environments
- **๐ Rich Reporting** - Multiple formats: grid, JSON, HTML, CSV, Markdown
- **โก Fast** - Optimized parallel execution
## ๐ Works With Your Existing Configs
Lintro respects your native tool configurations. If you have a `.prettierrc`,
`pyproject.toml [tool.ruff]`, or `.yamllint`, Lintro uses them automatically - no
migration required.
- **Native configs are detected** - Your existing `.prettierrc`, `.oxlintrc.json`, etc.
work as-is
- **Enforce settings override consistently** - Set `line_length: 88` once, applied
everywhere
- **Fallback defaults when needed** - Tools without native configs use sensible defaults
See the [Configuration Guide](docs/configuration.md) for details on the 4-tier config
system.
## ๐ ๏ธ Supported Tools
ToolLanguageAuto-fixInstall
Linters
โ๏ธ GitHub Actions
-
GitHub Releases
๐ฆ Rust
โ
rustup component add clippy
๐ณ Dockerfile
-
GitHub Releases
๐ Markdown
-
bun add -g markdownlint-cli2
npm install -g markdownlint-cli2
๐จ JS/TS
โ
bun add -g oxlint
npm install -g oxlint
๐ Shell Scripts
-
brew install shellcheck
GitHub Releases
Formatters
๐จ JS/TS
โ
bun add -g oxfmt
npm install -g oxfmt
๐จ JS/TS ยท ๐งพ JSON
โ
bun add -g prettier
npm install -g prettier
๐ Shell Scripts
โ
brew install shfmt
GitHub Releases
๐ฆ Rust
โ
rustup component add rustfmt
Lint + Format
๐๏ธ SQL
โ
pipx install sqlfluff
๐งพ TOML
โ
brew install taplo
GitHub Releases
Type Checkers
๐ Astro
-
bun add astro
npm install astro
๐ฅ Svelte
-
bun add -D svelte-check
npm install -D svelte-check
๐จ JS/TS
-
bun add -g typescript
npm install -g typescript
brew install typescript
๐ Vue
-
bun add -D vue-tsc
npm install -D vue-tsc
Security
๐ Secret Detection
-
brew install gitleaks
GitHub Releases
๐ฆ Rust
-
cargo install cargo-audit
๐ฆ Rust
-
cargo install cargo-deny
๐ Multi-language
-
pipx install semgrep
pip install semgrep
brew install semgrep
> ๐ฆ = bundled with lintro โ no separate install needed\
> โก Node.js tools support `--auto-install` to install dependencies automatically
## ๐ฆ Installation
**Python 3.11+** is required. Check tool versions with `lintro list-tools`.
```bash
# PyPI (recommended)
uv pip install lintro # or: pip install lintro
# Homebrew (macOS binary)
brew tap lgtm-hq/tap && brew install lintro-bin
# Docker (tools image - includes all external tools)
docker run --rm -v $(pwd):/code ghcr.io/lgtm-hq/py-lintro:latest check
# Docker (base image - minimal, no external tools)
docker run --rm -v $(pwd):/code ghcr.io/lgtm-hq/py-lintro:base check
```
See [Getting Started](docs/getting-started.md) for detailed installation options.
## ๐ป Usage
```bash
# Check all files (alias: chk)
lintro check .
# Auto-fix issues (alias: fmt)
lintro format .
# Grid output with grouping
lintro check --output-format grid --group-by file
# Run specific tools
lintro check --tools ruff,prettier,mypy
# Auto-install Node.js dependencies
lintro check --tools tsc --auto-install
# Exclude directories
lintro check --exclude "node_modules,dist,venv"
# List available tools
lintro list-tools
```
### ๐ณ Docker
```bash
# Run from GHCR (tools image - recommended)
docker run --rm -v $(pwd):/code ghcr.io/lgtm-hq/py-lintro:latest check
# With formatting
docker run --rm -v $(pwd):/code ghcr.io/lgtm-hq/py-lintro:latest check --output-format grid
# Base image (minimal, no external tools)
docker run --rm -v $(pwd):/code ghcr.io/lgtm-hq/py-lintro:base check
```
## ๐ Documentation
| Guide | Description |
| ------------------------------------------------ | --------------------------------------- |
| [Getting Started](docs/getting-started.md) | Installation, first steps, requirements |
| [Configuration](docs/configuration.md) | Tool configuration, options, presets |
| [Docker Usage](docs/docker.md) | Containerized development |
| [GitHub Integration](docs/github-integration.md) | CI/CD setup, workflows |
| [Contributing](docs/contributing.md) | Development guide, adding tools |
| [Troubleshooting](docs/troubleshooting.md) | Common issues and solutions |
**Advanced:** [Tool Analysis](docs/tool-analysis/) ยท [Architecture](docs/architecture/)
ยท [Security](docs/security/)
## ๐จ Development
```bash
# Clone and install
git clone https://github.com/lgtm-hq/py-lintro.git
cd py-lintro
uv sync --dev
# Run tests
./scripts/local/run-tests.sh
# Run lintro on itself
./scripts/local/local-lintro.sh check --output-format grid
```
## ๐ค Community
- ๐
[Bug Reports](https://github.com/lgtm-hq/py-lintro/issues/new?template=bug_report.md)
- ๐ก
[Feature Requests](https://github.com/lgtm-hq/py-lintro/issues/new?template=feature_request.md)
- โ [Questions](https://github.com/lgtm-hq/py-lintro/issues/new?template=question.md)
- ๐ [Contributing Guide](docs/contributing.md)
## ๐ License
MIT License - see [LICENSE](LICENSE) for details.