-
Notifications
You must be signed in to change notification settings - Fork 38
/
plugin.yaml
55 lines (55 loc) · 1.74 KB
/
plugin.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
version: 0.1
downloads:
- name: shellcheck
version: 0.8.0
downloads:
- os:
linux: linux
cpu:
arm_64: aarch64
x86_64: x86_64
url: https://github.com/koalaman/shellcheck/releases/download/v${version}/shellcheck-v${version}.${os}.${cpu}.tar.xz
strip_components: 1
- os: macos
cpu: x86_64
url: https://github.com/koalaman/shellcheck/releases/download/v${version}/shellcheck-v${version}.darwin.x86_64.tar.xz
strip_components: 1
# Use rosetta
- os: macos
cpu: arm_64
url: https://github.com/koalaman/shellcheck/releases/download/v${version}/shellcheck-v${version}.darwin.x86_64.tar.xz
strip_components: 1
# No windows release
tools:
definitions:
- name: shellcheck
download: shellcheck
shims: [shellcheck]
known_good_version: 0.8.0
lint:
definitions:
- name: shellcheck
files: [shell]
tools: [shellcheck]
description: Finds bugs in your shell scripts
commands:
- name: lint
# Custom parser type defined in the trunk cli to handle rubocop's JSON output.
output: shellcheck
run: shellcheck ${target} -f json --external-sources
error_codes: [2]
sandbox_type: copy_targets
direct_configs:
- .shellcheckrc
- shellcheckrc
environment:
- name: PATH
list: ["${linter}"]
issue_url_format: https://github.com/koalaman/shellcheck/wiki/{}
known_good_version: 0.8.0
suggest_if: files_present
# uncached because shellcheck can follow includes, e.g. source other.sh
cache_results: false
version_command:
parse_regex: ${semver}
run: shellcheck --version