Help us shape the future of Go! Take the 2026 Go Developer Survey

lintpal

module
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2026 License: MIT

README

LintPal

Test npm version

Lint committed changes against the rules your team writes. Put requirements in Markdown files beside your code. LintPal checks changed lines in two Git revisions, reports findings with file and line anchors, and can fail CI when a finding reaches your severity gate.

Start

Install LintPal in your project, or use npx lintpal directly:

npm install --save-dev lintpal
mkdir -p .lintpal/rules/go
cat > .lintpal/rules/go/errors.md <<'RULE'
Handle errors returned by calls when failure can change the result or behavior.
RULE
export TYPESAFE_API_KEY='your-provider-key'
npx lintpal lint --base origin/main --head HEAD

Both revisions must be committed and available locally. LintPal reads rules from the Git worktree root .lintpal/rules/, even when run from a subdirectory. There are no built-in mandates. A missing or invalid rule directory stops the run before any provider request. The selected provider receives bounded committed source context and rule text; see privacy.

The command prints Markdown findings. The default gate fails with exit code 10 for a finding of high or critical severity, after writing the complete output. Use --out .artifacts/lintpal/findings.json for a JSON artifact, or --format json for JSON on stdout. See the CLI reference for provider options, filters, and two-command CI feedback.

Stored findings can also be published to a GitHub pull request without another model call. lintpal feedback github posts a deterministic blocking-status result and inline rule findings; it does not generate a semantic code review or change summary. See the CLI reference for flags and the required pull-request permission.

Work with rules

Each .md file is one mandate; its path beneath .lintpal/rules/ is its ID. Optional frontmatter sets title, severity, and threshold. Directory names organize IDs; every rule applies to eligible changed lines on both sides of the diff.

npx lintpal rule list
npx lintpal rule view go/errors.md
npx lintpal rule validate
npx lintpal rule import ./team-rules --prefix team

rule import copies validated Markdown into .lintpal/rules/, so the next lint uses it automatically. Commit and review those files with your project. GitHub imports can select a ref and subdirectory; rule import explains the source syntax and collision handling. See rule authoring for examples and per-run overrides.

Learn more

The commands above describe this source revision. Check releases for the features in a published npm version. LintPal is available under the MIT license.

Directories

Path Synopsis
cmd
lintpal command
docs
internal
apps/lintpal/contextplan
Package contextplan assembles bounded committed-source context and plans typed questions without invoking a provider.
Package contextplan assembles bounded committed-source context and plans typed questions without invoking a provider.
apps/lintpal/eval
Package eval evaluates frozen examples with typed, local answers.
Package eval evaluates frozen examples with typed, local answers.
apps/lintpal/git
Package git reads committed changes without consulting the working tree.
Package git reads committed changes without consulting the working tree.
apps/lintpal/jev
Package jev defines the typed decision boundary used by lintpal.
Package jev defines the typed decision boundary used by lintpal.
apps/lintpal/provider/systemone
Package systemone implements the typed Jev System One HTTP transport.
Package systemone implements the typed Jev System One HTTP transport.
apps/lintpal/report
Package report defines LintPal's validated, deterministic findings artifact.
Package report defines LintPal's validated, deterministic findings artifact.
apps/lintpal/ruleimport
Package ruleimport copies validated Markdown mandates into a repository.
Package ruleimport copies validated Markdown mandates into a repository.
apps/lintpal/rules
Package rules loads declarative lint rules and maps typed Jev answers to deterministic decisions.
Package rules loads declarative lint rules and maps typed Jev answers to deterministic decisions.
apps/lintpal/rulesource
Package rulesource resolves a worktree and reads pinned remote Markdown rules.
Package rulesource resolves a worktree and reads pinned remote Markdown rules.
apps/lintpal/runtime/adk
Package adk owns the optional, local ADK observability lifecycle.
Package adk owns the optional, local ADK observability lifecycle.
scripts
self-review command
Command self-review builds lintpal and reviews a committed comparison.
Command self-review builds lintpal and reviews a committed comparison.
verify-docs command
Command verify-docs checks local Markdown links and rule examples offline.
Command verify-docs checks local Markdown links and rule examples offline.
verify-format command
Command verify-format checks Go formatting without a platform-specific shell.
Command verify-format checks Go formatting without a platform-specific shell.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL