@brokkai/slopcop 0.0.4 → 0.0.5
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 +36 -11
- package/native/darwin_amd64/slopcop +0 -0
- package/native/darwin_arm64/slopcop +0 -0
- package/native/linux_amd64/slopcop +0 -0
- package/native/linux_arm64/slopcop +0 -0
- package/native/windows_amd64/slopcop.exe +0 -0
- package/native/windows_arm64/slopcop.exe +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -110,9 +110,12 @@ harness is present, and names what it did:
|
|
|
110
110
|
| `~/.claude/skills/slopcop/` | Claude Code, opencode |
|
|
111
111
|
| `$CODEX_HOME/skills/slopcop/`, or `~/.codex/skills/slopcop/` | Codex home |
|
|
112
112
|
|
|
113
|
-
A skill that is already there is left alone, so
|
|
114
|
-
|
|
115
|
-
|
|
113
|
+
A skill that is already there is left alone by init, so running it again is
|
|
114
|
+
safe. `slopcop login` and every check also install the skill in those
|
|
115
|
+
directories, rewriting one that differs from the skill bundled into the binary,
|
|
116
|
+
so an agent follows the instructions of the slopcop version it runs; local
|
|
117
|
+
edits to an installed skill do not survive them. `slopcop init --no-skill`
|
|
118
|
+
skips the install and any update of it.
|
|
116
119
|
|
|
117
120
|
## Sign in
|
|
118
121
|
|
|
@@ -192,17 +195,35 @@ already in the code are counted, never fail the check, and are listed only with
|
|
|
192
195
|
`--show-existing`. A change that introduces nothing exits `0`, however many
|
|
193
196
|
findings the repository already holds.
|
|
194
197
|
|
|
198
|
+
### Ignore a false positive
|
|
199
|
+
|
|
200
|
+
Each finding a check reports carries an `id`. When a finding is a false
|
|
201
|
+
positive, ignore it:
|
|
202
|
+
|
|
203
|
+
```console
|
|
204
|
+
slopcop ignore 0f8fad5b-d9cb-469f-a165-70867728950e
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
That finding is not reported again for this repository. Ignoring covers that
|
|
208
|
+
one finding, its rule plus its place in the code, in its repository for your
|
|
209
|
+
workspace; the rule keeps reporting everything else. Ignoring a finding twice
|
|
210
|
+
is fine. `ignore` uses the same login and service URL as a check, exits `0`
|
|
211
|
+
with a one-line confirmation, and otherwise exits `2` with the service's
|
|
212
|
+
message and remedy; `finding_not_found` means the id is unknown or comes from a
|
|
213
|
+
check outside your workspace.
|
|
214
|
+
|
|
195
215
|
### Output and exit codes
|
|
196
216
|
|
|
197
217
|
The service answers structured data; the CLI renders it. `human` prints one
|
|
198
|
-
block per new finding,
|
|
218
|
+
block per new finding, with an `ID:` line when the service names one, then the
|
|
219
|
+
pre-existing ones with `--show-existing`, a
|
|
199
220
|
summary line such as `1 new finding across 1 file(s); 72 already in the code
|
|
200
221
|
(--show-existing lists them) | Analysis complete`, and any omitted or
|
|
201
222
|
incomplete checks. `json` prints `status`, `baseCommit`, `summary`
|
|
202
223
|
(`newFindings` and `existingFindings` count the split), `findings` (each with
|
|
203
|
-
`new`), `incomplete`, and `failure` when the analysis did not
|
|
204
|
-
prints a SARIF 2.1.0 log whose results carry `baselineState`
|
|
205
|
-
`unchanged`. `--format` and `--show-existing` only change the rendering, never
|
|
224
|
+
`new` and its `id`), `incomplete`, and `failure` when the analysis did not
|
|
225
|
+
complete. `sarif` prints a SARIF 2.1.0 log whose results carry `baselineState`
|
|
226
|
+
`new` or `unchanged` and the finding id in `properties["slopcop.findingId"]`. `--format` and `--show-existing` only change the rendering, never
|
|
206
227
|
the request, so the service answers the same check whichever is used.
|
|
207
228
|
|
|
208
229
|
| Exit | Meaning |
|
|
@@ -243,10 +264,6 @@ rewrite them. The remedies name no client, so when one says to sign in the CLI
|
|
|
243
264
|
adds the `slopcop login` command after it. A failed request prints no report
|
|
244
265
|
on stdout.
|
|
245
266
|
|
|
246
|
-
While SlopCop is still indexing the repository, the service answers
|
|
247
|
-
`indexing_in_progress` at once instead of running the check. The CLI prints it
|
|
248
|
-
and exits `2` without waiting or retrying.
|
|
249
|
-
|
|
250
267
|
## API
|
|
251
268
|
|
|
252
269
|
The CLI calls `POST <service>/v1/check` with a bearer token:
|
|
@@ -268,6 +285,14 @@ were marked `new`, the CLI treats every finding as new, as that service gated
|
|
|
268
285
|
on all of them. Non-2xx responses carry `code`, `message`,
|
|
269
286
|
`remedy`, `retryable`, and an optional `installUrl`.
|
|
270
287
|
|
|
288
|
+
Each finding in the response carries an `id`; a service from before findings
|
|
289
|
+
could be ignored omits it.
|
|
290
|
+
|
|
291
|
+
`slopcop ignore <id>` calls `POST <service>/v1/ignore` with the same bearer
|
|
292
|
+
token and `{"findingId": "<id>"}`, and gets back
|
|
293
|
+
`{"findingId": "<id>", "status": "ignored"}`. Failures use the same closed
|
|
294
|
+
contract, including `finding_not_found`.
|
|
295
|
+
|
|
271
296
|
`slopcop login` uses the device flow: `POST /api/device` returns a
|
|
272
297
|
`deviceCode`, `userCode`, `verificationUri`, `expiresIn`, and `interval`, and
|
|
273
298
|
`POST /api/token` returns `202` while pending or `200` with a `token` once
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|