| Crates.io | forseti |
| lib.rs | forseti |
| version | 0.1.1 |
| created_at | 2025-09-09 04:48:32.871018+00 |
| updated_at | 2025-09-13 06:06:36.245296+00 |
| description | A linter meant too handle all languages |
| homepage | |
| repository | https://github.com/forseti-linter/forseti |
| max_upload_size | |
| id | 1830288 |
| size | 82,048 |
A fast, multi-language linter built with Rust that supports pluggable engines and rulesets.
cargo install forseti
Forseti uses pluggable engines for different languages and rule types. Start with the base engine:
# Install base engine (text linting rules)
forseti install engine base
# Install from git repository
forseti install engine custom --git https://github.com/user/custom-engine.git
# List available engines
forseti list engines
Initialize configuration in your project:
forseti init
This creates a .forseti.toml configuration file.
Run the linter:
forseti lint
Forseti uses a .forseti.toml file for configuration. Here's an example:
[linter]
max_workers = 4
timeout_ms = 30000
output_format = "human"
[engine.base]
enabled = true
[engine.base.rulesets.base]
"no-trailing-whitespace" = "warn"
"max-line-length" = ["warn", { "limit" = 120 }]
"no-mixed-line-endings" = "error"
"off" - Disable the rule"warn" - Show as warning"error" - Show as error (fails CI/CD)Some rules accept additional options:
# Simple rule with severity only
"no-trailing-whitespace" = "warn"
# Rule with options
"max-line-length" = ["warn", { "limit" = 120 }]
# Lint current directory
forseti lint
# Lint specific files/directories
forseti lint src/
forseti lint main.rs lib.rs
# Lint recursively
forseti lint --recursive
# Verbose output
forseti --verbose lint
# List installed engines
forseti list engines
# Install engine from crates.io
forseti install engine base
# Install engine from git
forseti install engine custom --git https://github.com/user/engine.git
# Install specific version/branch
forseti install engine custom --git https://github.com/user/engine.git --branch main
# Uninstall engine
forseti uninstall engine base
# Initialize config in current directory
forseti init
# Use custom config file
forseti --config path/to/config.toml lint
Forseti supports multiple output formats:
# Human-readable (default)
forseti lint
# JSON output for CI/CD integration
forseti lint --format json
# Specify in config file
[linter]
output_format = "json"
# Quick check
forseti lint src/
# Comprehensive check with verbose output
forseti --verbose lint --recursive
# Install forseti and engines
cargo install forseti
forseti install engine base
# Run linting (fails on errors)
forseti lint --format json > lint-results.json
# Initialize new project
forseti init
# Install recommended engines
forseti install engine base
# Run first lint
forseti lint
rustup update--verbose flag for detailed error messages.forseti.tomlforseti list enginesforseti --verbose lint to see configuration loading detailsmax_workers in configuration for your systemtimeout_ms setting for slow engines# Show help
forseti --help
# Show command-specific help
forseti lint --help
forseti install --help