Getting started
Strider is intentionally strict out of the box: its defaults are designed to surface a broad range of correctness, maintainability, and style issues from the first run. If that policy is stricter than your project needs, see Configuration to tune the checks and adopt Strider at your own pace.
Download
Section titled “Download”Download and unpack the latest nightly binary for your Linux or macOS machine:
set -euo pipefail
case "$(uname -s)-$(uname -m)" in Darwin-arm64) asset="strider-nightly-darwin-arm64.tar.gz" ;; Darwin-x86_64) asset="strider-nightly-darwin-amd64.tar.gz" ;; Linux-aarch64) asset="strider-nightly-linux-arm64.tar.gz" ;; Linux-x86_64) asset="strider-nightly-linux-amd64.tar.gz" ;; *) echo "Unsupported platform: $(uname -s)-$(uname -m)" >&2; exit 1 ;;esac
url="https://github.com/gempir/strider/releases/download/nightly/$asset"curl -fL "$url" -o "/tmp/$asset"tar -xzf "/tmp/$asset"rm "/tmp/$asset"sudo mv strider /usr/local/bin/striderStrider currently targets Go 1.26 and builds as a statically linked binary.
make buildThe binary is written to ./strider. The equivalent Go command is:
CGO_ENABLED=0 go build -trimpath -o strider ./cmd/striderAdd project configuration
Section titled “Add project configuration”Create strider.toml at the repository root. Strider discovers it from the
current directory or any parent:
version = 1
[formatter]print-width = 180
[checks]minimum-severity = "warning"
[checks.rules.file-length-limit]severity = "warning"max-lines = 800
[checks.rules.possible-nil-dereference]severity = "error"See Configuration for every formatter, check, path, and baseline setting.
Check a project
Section titled “Check a project”Run all checks admitted by the configured severity floor recursively from the current directory:
strider checkAll 207 checks are eligible. The default warning floor runs 191; select individual codes when investigating a finding or adopting Strider incrementally:
strider check --only format,no-init,invalid-regexp ./...Use --minimum-severity warning or --minimum-severity error to run only the
corresponding policy layers without changing individual rules.
Include all note, warning, and error checks with:
strider check --minimum-severity note ./...check is read-only by default. Apply the initial safe automatic fixes for
formatting, double negation, redundant switch breaks, and single-argument
append calls with:
strider check --fix ./...Use --fix-unsafe only when you also want fixes classified as potentially
unsafe or unsafe. Both modes rerun the checks and report what remains. See
Checks for selection, validation, and safety
details.
If the format check reports a file, the focused formatting command is:
strider fmt path/to/file.goFormat a project
Section titled “Format a project”Run the formatter without paths to recursively write the current directory:
strider fmtInspect formatting changes without writing them:
strider fmt --diffAdopt existing findings
Section titled “Adopt existing findings”If an established repository has a backlog, generate one check baseline. Existing matches are suppressed while new findings remain visible:
strider check --generate-baseline --baseline strider-baseline.toml ./...Formatting findings are not captured. Commit the baseline and configure its
path under [checks]. See Baselines before regenerating or
pruning it.
Exit status
Section titled “Exit status”| Code | Meaning |
|---|---|
0 |
The command succeeded with no visible findings after any requested fixes, or a baseline update completed. |
1 |
One or more visible check findings remain. |
2 |
A command, fix validation, stale-source, parsing, package-loading, unsupported-syntax, configuration, baseline, or I/O error occurred. |
Reports and formatted source are written to standard output. Operational errors are written to standard error.