@diffpal/lintpal-win32-x64 0.3.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,135 +1,72 @@
1
- # lintpal
1
+ # LintPal
2
2
 
3
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
- [![Lint](https://github.com/diffpal/lintpal/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/diffpal/lintpal/actions/workflows/lint.yml)
5
- [![Security](https://github.com/diffpal/lintpal/actions/workflows/security.yml/badge.svg?branch=main)](https://github.com/diffpal/lintpal/actions/workflows/security.yml)
6
- [![Latest release](https://img.shields.io/github/v/release/diffpal/lintpal)](https://github.com/diffpal/lintpal/releases/latest)
7
4
  [![npm version](https://img.shields.io/npm/v/lintpal)](https://www.npmjs.com/package/lintpal)
8
5
  [![License: MIT](https://img.shields.io/github/license/diffpal/lintpal)](LICENSE)
9
6
 
10
- **Review committed code changes with questions you control.** lintpal compares
11
- two Git revisions, asks a selected System One provider focused questions, and
12
- reports findings on changed lines. Rules are declarative YAML, so a team can
13
- keep review policy beside its code, pin imported rule packs, and revisit the
14
- same committed inputs.
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.
15
11
 
16
- lintpal is a CLI for review, not an auto-fixer. It reads committed Git objects;
17
- unsaved and uncommitted working-tree changes are outside the comparison.
12
+ ## Start
18
13
 
19
- ## Start in a few commands
20
-
21
- Install the current public release through npm:
22
-
23
- ```bash
24
- npm install -g lintpal
25
- lintpal version
26
- ```
27
-
28
- To use features from this source revision before they reach npm, build it with
29
- Go 1.26.6 or newer:
30
-
31
- ```bash
32
- go build -o ./lintpal ./cmd/lintpal
33
- ./lintpal version
34
- ```
35
-
36
- Choose a provider credential. For the default `jev` provider, set
37
- `TYPESAFE_API_KEY` in your environment or copy [`.env.example`](.env.example)
38
- to `.env` and fill in the key. The local `doctor` check does not contact the
39
- provider:
40
-
41
- ```bash
42
- ./lintpal doctor --provider jev
43
- mkdir -p .artifacts/lintpal
44
- ./lintpal lint --base HEAD~1 --head HEAD --provider jev \
45
- --format json --fail-on high --out .artifacts/lintpal/report.json
46
- ```
47
-
48
- Both revisions must be available commits in the repository where you run
49
- lintpal. Use an absolute path to the built binary when reviewing another
50
- repository. The report is printed to stdout and written to the artifact path;
51
- exit code `10` means a finding met the gate **after** the complete report was
52
- written. See [getting started](docs/getting-started.md) for shallow clones,
53
- other providers, and error handling. See [distribution](docs/distribution.md)
54
- for the published package layout and release status.
55
-
56
- ## Make the review yours
57
-
58
- A rule pairs a question with a decision threshold and fixed diagnostic text.
59
- For example, a `noul` rule can ask whether changed Go code drops a meaningful
60
- error:
61
-
62
- ```yaml
63
- schema: lintpal.rules.v1
64
- rules:
65
- - id: go.unchecked-error
66
- type: noul
67
- instructions: Does the changed Go code discard an error whose failure should be handled?
68
- threshold: 0.95
69
- severity: high
70
- title: Possible unchecked error
71
- message: Review whether this error needs handling.
72
- paths: ['*.go']
73
- sides: [RIGHT]
74
- ```
75
-
76
- The checked-in [Go review pack](examples/rules/go-review/rules.yaml) also shows
77
- `choice` and `score` rules. The
78
- [documentation review pack](examples/rules/docs-review/rules.yaml) shows a
79
- focused Markdown rule. These are authoring examples, not claims of measured
80
- model accuracy. See [rule authoring](docs/rule-authoring.md) to write and
81
- calibrate rules.
82
-
83
- Import a pack explicitly from a local directory, verify its lockfile, and
84
- select it for a review:
14
+ Install LintPal in your project, or use `npx lintpal` directly:
85
15
 
86
16
  ```bash
87
- ./lintpal pack import go-review ./examples/rules/go-review
88
- ./lintpal pack verify go-review
89
- ./lintpal lint --base HEAD~1 --head HEAD --rules @go-review
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
90
24
  ```
91
25
 
92
- GitHub imports require an explicit ref. lintpal resolves it to a commit,
93
- stores a local copy, and records the exact content hash in
94
- `.lintpal/packs.lock.json`. Normal lint runs use the local copy offline; see
95
- [rule packs](docs/rule-packs.md) for source syntax and updates.
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).
96
31
 
97
- ## Use it in development
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.
98
37
 
99
- [Task](https://taskfile.dev/docs/installation) runs routine checks from
100
- `Taskfile.yml`:
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.
101
43
 
102
- ```bash
103
- task --list
104
- task check
105
- task self-review-smoke
106
- ```
44
+ ## Work with rules
107
45
 
108
- `task check` builds, tests, vets, checks formatting, evaluates the frozen
109
- offline corpus, and verifies docs and installed packs without a provider key.
110
- The [test workflow](.github/workflows/test.yml) keeps these checks credential-free
111
- on Linux, macOS, and Windows as appropriate. To review lintpal itself with a
112
- real provider, use explicit committed refs:
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.
113
50
 
114
51
  ```bash
115
- BASE=origin/main HEAD=HEAD task self-review
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
116
56
  ```
117
57
 
118
- This opt-in command writes `.artifacts/lintpal/self-review.json`. Read the
119
- [self-review guide](docs/self-review.md) for provider setup, rule selection,
120
- and gate behavior.
121
-
122
- ## Documentation
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.
123
63
 
124
- Start at the [documentation index](docs/index.md), or jump to:
64
+ ## Learn more
125
65
 
126
- | Use lintpal | Extend and maintain it |
127
- | --- | --- |
128
- | [Getting started](docs/getting-started.md) · [Configuration](docs/configuration.md) · [CLI](docs/cli.md) | [Rule authoring](docs/rule-authoring.md) · [Rule packs](docs/rule-packs.md) |
129
- | [Reports](docs/report.md) · [Privacy and limits](docs/privacy.md) | [Development tasks](docs/development.md) · [Self-review](docs/self-review.md) · [Evaluation](docs/evaluation.md) |
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)
130
69
 
131
- When a remote provider is selected, lintpal sends bounded committed source
132
- context and rule questions to it. Review the [privacy guide](docs/privacy.md)
133
- before running a live review. The current CLI does not inspect uncommitted
134
- changes, apply fixes, or report measured model precision. lintpal is available
135
- under the [MIT license](LICENSE).
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
@@ -17,5 +17,5 @@
17
17
  "type": "git",
18
18
  "url": "git+https://github.com/diffpal/lintpal.git"
19
19
  },
20
- "version": "0.3.0"
20
+ "version": "0.4.0"
21
21
  }