bash-explainer 0.5.0 → 0.6.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 +2 -0
- package/dist/cli.js +117 -113
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -51,6 +51,8 @@ bash-explainer --check install.sh # constructs its shell (#!/bin/sh: dash…
|
|
|
51
51
|
| `--lsp` | run as a Language Server on standard input and output (see [In your editor](#in-your-editor-language-server)) |
|
|
52
52
|
| `--color`, `--no-color` | colour the text output (default: when writing to a terminal; `NO_COLOR` turns it off) |
|
|
53
53
|
|
|
54
|
+
In the text output, a construct is labelled with its keywords and a placeholder for what is left out (`while` *condition* `do` *commands* `done`): the placeholder is in italics and dim with colour, and shown as `‹condition›` without. With `--format json`, `label` is that text and `labelParts` lists the parts (`{ "text": "while" }`, `{ "text": "condition", "placeholder": true }`…).
|
|
55
|
+
|
|
54
56
|
`--check` prints problems as compilers do (`file:line:column: warning: … [code]`), so editors and CI can pick them up. With `--format github` they become GitHub Actions annotations, shown on the pull request's diff; with `--format sarif`, a SARIF file for code scanning.
|
|
55
57
|
|
|
56
58
|
## In CI (GitHub Actions)
|