Back

CLI Reference

The legacylint command line interface is the primary way to interact with the analyzer.

Commands
scan

Analyzes Object Pascal and VB6 source code in the specified directory or file.

legacylint scan [path] [options]
scan options
Option Description
--format Output format: json (default), sarif, or github (Actions annotations)
--output, -o Write results to a file instead of stdout
--server-url LegacyLint API base URL. Defaults to https://api.legacylint.com when an API key is set (override via LEGACYLINT_SERVER_URL); only needed for staging or self-hosted setups
--project-key Project to upload to (optional when the API key is project-scoped)
--api-key Your project's API key (or set LEGACYLINT_API_KEY). Required to scan; results upload to your dashboard automatically
--write-baseline Record the current findings as the accepted baseline at this path
--baseline Path to a baseline file. Findings recorded in it are reported but do not trigger --fail-on
--fail-on Exit non-zero when a finding reaches this severity or higher: none (default), info, warning, or error. Use it to gate a CI build; the scan otherwise always exits 0 when it ran successfully
--privacy normal (default) or high (redacts file path, lines, and message on upload)
--commit-sha Commit SHA to associate with the scan
Global Options
Option Description
--version Show version information
--help Show help and usage information
Reconnecting… Connection lost. Reload