Documentation Index
Fetch the complete documentation index at: https://docs.qlty.sh/llms.txt
Use this file to discover all available pages before exploring further.
Qlty integrates with linters, auto-formatters, security scanners, and other static analysis tools as plugins.
Each plugin consists of two components:
- A plugin definition in a TOML configuration file
- A results parser implemented in Rust
Here is a simplified example plugin definition for Ruff:
config_version = "0"
[plugins.definitions.ruff]
runtime = "python"
package = "ruff"
file_types = ["python"]
version_command = "ruff version"
config_files = ["ruff.toml"]
issue_url_format = "https://docs.astral.sh/ruff/rules/${rule}"
[plugins.definitions.ruff.drivers.lint]
script = "ruff check --exit-zero --output-format sarif --output-file ${tmpfile} ${target}"
success_codes = [0]
output = "tmpfile"
output_format = "sarif"
batch = true
Gitleaks supports outputting results in the SARIF standard format, so a custom results parser is not needed. For tools which do not support SARIF, a results parser is implemented within the Qlty CLI and referenced by name.
Auto-formatters are a special type of plugin because they rewrite files rather than outputting findings. Therefore, they do not require results parsers.
Here is an example of a plugin definition for the shfmt auto-formatter:
config_version = "0"
[plugins.definitions.shfmt]
package = "mvdan.cc/sh/v${major_version}/cmd/shfmt"
runtime = "go"
file_types = ["shell"]
version_command = "shfmt --version"
affects_cache = [".editorconfig"]
[plugins.definitions.shfmt.drivers.format]
script = "shfmt -w -s ${target}"
success_codes = [0, 1]
output = "rewrite"
cache_results = true
batch = true
driver_type = "formatter"
Note the specification of output = "rewrite" and driver_type = "formatter".