Skip to content

Commit 46fabcd

Browse files
committed
pants: Add shellcheck for shell_source(s) targets
This excludes some scripts from shellcheck because they weren't linted previously. We can clean them up in one or more follow-up PRs and remove `skip_shellcheck=True` from the relevant BUILD targets to re-enable shellcheck for those files.
1 parent 0323973 commit 46fabcd

File tree

13 files changed

+17
-3
lines changed

13 files changed

+17
-3
lines changed

contrib/core/actions/send_mail/BUILD

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
shell_source(
22
source="send_mail",
3+
skip_shellcheck=True,
34
)

contrib/examples/actions/BUILD

+1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ python_sources()
22

33
shell_sources(
44
name="shell",
5+
skip_shellcheck=True,
56
)
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
shell_sources()
1+
shell_sources(skip_shellcheck=True)
+5-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
shell_sources()
1+
shell_sources(
2+
overrides={
3+
"random2.sh": {"skip_shellcheck": True},
4+
},
5+
)

contrib/linux/actions/BUILD

+1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ python_sources()
22

33
shell_sources(
44
name="shell",
5+
skip_shellcheck=True,
56
)

pants.toml

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ backend_packages = [
1515

1616
# shell
1717
"pants.backend.shell",
18+
"pants.backend.shell.lint.shellcheck",
1819
]
1920
# pants ignores files in .gitignore, .*/ directories, /dist/ directory, and __pycache__.
2021
pants_ignore.add = [

st2actions/bin/BUILD

+1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ python_sources(
44

55
shell_sources(
66
name="shell",
7+
skip_shellcheck=True,
78
)

st2common/bin/BUILD

+1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ python_sources(
55
shell_sources(
66
name="shell",
77
sources=["st2ctl", "st2-self-check", "st2-run-pack-tests"],
8+
skip_shellcheck=True,
89
)

st2common/bin/migrations/v2.1/BUILD

+1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ python_sources()
22

33
shell_sources(
44
name="shell",
5+
skip_shellcheck=True,
56
)

st2tests/integration/BUILD

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
shell_sources(
22
name="shell",
3+
skip_shellcheck=True,
34
)

st2tests/st2tests/fixtures/packs/BUILD

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ resources(
1414

1515
shell_sources(
1616
name="test_content_version_shell",
17+
skip_shellcheck=True,
1718
sources=[
1819
"test_content_version/**/*.sh",
1920
],
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
shell_sources()
1+
shell_sources(skip_shellcheck=True)

tools/BUILD

+1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ shell_sources(
66
"*.sh",
77
"st2-setup-*",
88
],
9+
skip_shellcheck=True,
910
)

0 commit comments

Comments
 (0)