@codacy/tools-shellcheck-0 0.1.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/LICENSE +21 -0
- package/README.md +56 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +4281 -0
- package/package.json +31 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Codacy
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# @codacy/tools-shellcheck-0
|
|
2
|
+
|
|
3
|
+
## Table of Contents
|
|
4
|
+
- [Overview](#overview)
|
|
5
|
+
- [Updating patterns](#updating-patterns)
|
|
6
|
+
- [Updating the ShellCheck version](#updating-the-shellcheck-version)
|
|
7
|
+
- [Development](#development)
|
|
8
|
+
- [Notes for maintainers](#notes-for-maintainers)
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Overview
|
|
13
|
+
|
|
14
|
+
Shell script linter using the [ShellCheck](https://www.shellcheck.net/) binary. Uses the CLI execution strategy — spawns `shellcheck` via `spawnTool()` and parses its JSON output.
|
|
15
|
+
|
|
16
|
+
| Property | Value |
|
|
17
|
+
|----------|-------|
|
|
18
|
+
| Tool ID | `shellcheck` |
|
|
19
|
+
| Codacy UUID | `233f8aac-4fb6-4193-8a17-e64515bea152` |
|
|
20
|
+
| Strategy | CLI |
|
|
21
|
+
| Languages | Shell (Bash, sh, dash, ksh) |
|
|
22
|
+
| Binary | `shellcheck` |
|
|
23
|
+
| File patterns | `**/*.sh`, `**/*.bash` |
|
|
24
|
+
|
|
25
|
+
## Updating patterns
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# Re-fetch pattern metadata from the Codacy API
|
|
29
|
+
pnpm prefetch
|
|
30
|
+
|
|
31
|
+
# Commit the result
|
|
32
|
+
git add src/patterns.json
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Pattern IDs follow the format `shellcheck_SC2086`, `shellcheck_SC2034`, etc.
|
|
36
|
+
|
|
37
|
+
## Updating the ShellCheck version
|
|
38
|
+
|
|
39
|
+
1. Update `preferredVersion` in `src/adapter.ts`
|
|
40
|
+
2. Update the download URL template if the release format changed
|
|
41
|
+
3. Run `pnpm prefetch` to check for new/removed rules
|
|
42
|
+
4. Run `pnpm test` to verify compatibility
|
|
43
|
+
5. If the major version changes, create a new adapter package (`shellcheck-1/`)
|
|
44
|
+
|
|
45
|
+
## Development
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
pnpm build # Build with tsup
|
|
49
|
+
pnpm test # Run tests (requires shellcheck in PATH or auto-install)
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Notes for maintainers
|
|
53
|
+
|
|
54
|
+
- ShellCheck outputs JSON via `--format=json1`.
|
|
55
|
+
- Exit code 0 = no findings, 1 = findings found (normal), 2+ = error.
|
|
56
|
+
- The binary is downloaded from GitHub releases and installed to `~/.codacy/tools/shellcheck-0/`.
|