@diffpal/lintpal-win32-x64 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,77 +1,72 @@
1
- # lintpal
1
+ # LintPal
2
2
 
3
- `lintpal` reviews a **committed Git comparison** with declarative rules and a
4
- selected System One provider. It prints a deterministic report of diagnostics
5
- anchored to changed lines. The current MVP reads committed blobs only; save and
6
- commit the revision you want to inspect before running it.
3
+ [![Test](https://github.com/diffpal/lintpal/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/diffpal/lintpal/actions/workflows/test.yml)
4
+ [![npm version](https://img.shields.io/npm/v/lintpal)](https://www.npmjs.com/package/lintpal)
5
+ [![License: MIT](https://img.shields.io/github/license/diffpal/lintpal)](LICENSE)
7
6
 
8
- The first lintpal release is planned as `v0.2.0` under the [MIT license](LICENSE).
9
- Once publication is verified, users will be able to install either npm identity:
7
+ **Lint committed changes against the rules your team writes.** Put requirements
8
+ in Markdown files beside your code. LintPal checks changed lines in two Git
9
+ revisions, reports findings with file and line anchors, and can fail CI when a
10
+ finding reaches your severity gate.
10
11
 
11
- ```bash
12
- npm install -g lintpal@0.2.0
13
- # or
14
- npm install -g @diffpal/lintpal@0.2.0
15
- lintpal version
16
- ```
12
+ ## Start
17
13
 
18
- These registry commands become available only after the release Story finishes;
19
- the local build below works now.
14
+ Install LintPal in your project, or use `npx lintpal` directly:
20
15
 
21
- The earlier `jevlint` v0.1.0 tag and six scoped npm packages remain available
22
- for existing installs. npm rejected the unscoped `jevlint` name, so that release
23
- did not receive a GitHub release.
16
+ ```bash
17
+ npm install --save-dev lintpal
18
+ mkdir -p .lintpal/rules/go
19
+ cat > .lintpal/rules/go/errors.md <<'RULE'
20
+ Handle errors returned by calls when failure can change the result or behavior.
21
+ RULE
22
+ export TYPESAFE_API_KEY='your-provider-key'
23
+ npx lintpal lint --base origin/main --head HEAD
24
+ ```
24
25
 
25
- ## Build and try locally
26
+ Both revisions must be committed and available locally. LintPal reads rules
27
+ from the Git worktree root `.lintpal/rules/`, even when run from a subdirectory.
28
+ There are no built-in mandates. A missing or invalid rule directory stops the
29
+ run before any provider request. The selected provider receives bounded
30
+ committed source context and rule text; see [privacy](docs/privacy.md).
26
31
 
27
- Go 1.26.6 or newer is required by `go.mod`. From the repository root:
32
+ The command prints Markdown findings. The default gate fails with exit code
33
+ `10` for a finding of **high** or **critical** severity, after writing the
34
+ complete output. Use `--out .artifacts/lintpal/findings.json` for a JSON
35
+ artifact, or `--format json` for JSON on stdout. See the [CLI reference](docs/cli.md)
36
+ for provider options, filters, and two-command CI feedback.
28
37
 
29
- ```bash
30
- go build -o ./lintpal ./cmd/lintpal
31
- ./lintpal version
32
- ./lintpal --help
33
- go test ./cmd/lintpal -run TestProcessExitAndStreams -count=1
34
- ```
38
+ Stored findings can also be published to a GitHub pull request without another
39
+ model call. `lintpal feedback github` posts a deterministic blocking-status
40
+ result and inline rule findings; it does not generate a semantic code review or
41
+ change summary. See the [CLI reference](docs/cli.md#lintpal-cli) for flags and
42
+ the required pull-request permission.
35
43
 
36
- The process test creates temporary committed Git repositories and a local fake
37
- System One server, so the last command needs no provider secret or network
38
- account. A plain local build reports version `dev`. Omnidist staging can embed
39
- an explicit version; see [distribution staging](docs/distribution.md).
44
+ ## Work with rules
40
45
 
41
- To lint a real comparison, run these commands **inside the repository being
42
- reviewed** after both revisions are committed:
46
+ Each `.md` file is one mandate; its path beneath `.lintpal/rules/` is its ID.
47
+ Optional frontmatter sets `title`, `severity`, and `threshold`. Directory names
48
+ organize IDs; every rule applies to eligible changed lines on both sides of the
49
+ diff.
43
50
 
44
51
  ```bash
45
- export TYPESAFE_API_KEY='your-token'
46
- ./lintpal doctor --provider jev
47
- mkdir -p .artifacts/lintpal
48
- ./lintpal lint --base origin/main --head HEAD --provider jev \
49
- --format json --fail-on high --out .artifacts/lintpal/report.json
52
+ npx lintpal rule list
53
+ npx lintpal rule view go/errors.md
54
+ npx lintpal rule validate
55
+ npx lintpal rule import ./team-rules --prefix team
50
56
  ```
51
57
 
52
- Use an absolute path to the built executable when linting another repository.
53
- The default provider is `jev`; `openrouter` reads `OPENROUTER_API_KEY`, and
54
- `custom` reads `LINTPAL_TOKEN` by default and requires `--base-url`. `doctor`
55
- checks the local Git repository and presence of the selected credential; it
56
- does not contact the provider. A real `lint` sends bounded committed source
57
- context and rule questions to the selected provider. See the [CLI guide](docs/cli.md)
58
- for flags, environment settings, output formats, and exit codes. Exit code `10`
59
- means the complete report was written and a finding met `--fail-on`; it can be
60
- used as a CI gate.
58
+ `rule import` copies validated Markdown into `.lintpal/rules/`, so the next lint
59
+ uses it automatically. Commit and review those files with your project. GitHub
60
+ imports can select a ref and subdirectory; [rule import](docs/rule-import.md)
61
+ explains the source syntax and collision handling. See [rule authoring](docs/rule-authoring.md)
62
+ for examples and per-run overrides.
61
63
 
62
- ## CI and reports
64
+ ## Learn more
63
65
 
64
- The checked-in [CI workflow](.github/workflows/ci.yml) builds and tests on
65
- Linux, macOS, and Windows without provider credentials. For a repository using
66
- `lintpal` as a quality gate, install a locally built or separately approved
67
- binary in the job, fetch the base revision, provide the selected credential as
68
- a CI secret, then run the `lint` command above with `--base` and `--head` set to
69
- commits available in that checkout. Handle exit code `10` as a lint failure;
70
- other nonzero codes indicate setup, provider, or export failure. Never print
71
- the credential or enable shell tracing around it.
66
+ - [Getting started](docs/getting-started.md) and [configuration](docs/configuration.md)
67
+ - [Findings and gates](docs/report.md)
68
+ - [Contributing](CONTRIBUTING.md) and [development tasks](docs/development.md)
72
69
 
73
- The [report reference](docs/report.md) defines the versioned JSON and human
74
- formats. [Privacy and limitations](docs/privacy.md) explains source transfer,
75
- local metrics, bounded inputs, and the current quality evidence. The
76
- [evaluation guide](docs/evaluation.md) describes the offline corpus and an
77
- optional, explicit live procedure.
70
+ The commands above describe this source revision. Check
71
+ [releases](https://github.com/diffpal/lintpal/releases) for the features in a
72
+ published npm version. LintPal is available under the [MIT license](LICENSE).
package/bin/lintpal.exe CHANGED
Binary file
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  ],
16
16
  "repository": {
17
17
  "type": "git",
18
- "url": "https://github.com/diffpal/lintpal"
18
+ "url": "git+https://github.com/diffpal/lintpal.git"
19
19
  },
20
- "version": "0.2.0"
20
+ "version": "0.4.0"
21
21
  }