Skip to content

Commit

Permalink
Merge pull request #5751: Use shellcheck (via pantsbuild)
Browse files Browse the repository at this point in the history
  • Loading branch information
cognifloyd authored Oct 10, 2022
2 parents 8fb4d28 + beae45f commit 11989ed
Show file tree
Hide file tree
Showing 21 changed files with 63 additions and 13 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Added

* Begin introducing `pants <https://www.pantsbuild.org/docs>`_ to improve DX (Developer Experience)
working on StackStorm, improve our security posture, and improve CI reliability thanks in part
to pants' use of PEX lockfiles. This is not a user-facing addition. #5713 #5724 #5726 #5725 #5732 #5733 #5737 #5738 #5758
to pants' use of PEX lockfiles. This is not a user-facing addition. #5713 #5724 #5726 #5725 #5732 #5733 #5737 #5738 #5758 #5751
Contributed by @cognifloyd

Changed
Expand Down
4 changes: 4 additions & 0 deletions contrib/core/actions/send_mail/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
shell_source(
source="send_mail",
skip_shellcheck=True,
)
3 changes: 2 additions & 1 deletion contrib/examples/actions/BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
python_sources()

shell_sources(
name="actions0",
name="shell",
skip_shellcheck=True,
)
2 changes: 1 addition & 1 deletion contrib/examples/actions/bash_ping/BUILD
Original file line number Diff line number Diff line change
@@ -1 +1 @@
shell_sources()
shell_sources(skip_shellcheck=True)
6 changes: 5 additions & 1 deletion contrib/examples/actions/bash_random/BUILD
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
shell_sources()
shell_sources(
overrides={
"random2.sh": {"skip_shellcheck": True},
},
)
3 changes: 2 additions & 1 deletion contrib/linux/actions/BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
python_sources()

shell_sources(
name="actions0",
name="shell",
skip_shellcheck=True,
)
1 change: 1 addition & 0 deletions pants.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ backend_packages = [

# shell
"pants.backend.shell",
"pants.backend.shell.lint.shellcheck",
]
# pants ignores files in .gitignore, .*/ directories, /dist/ directory, and __pycache__.
pants_ignore.add = [
Expand Down
2 changes: 1 addition & 1 deletion scripts/BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
python_sources()

shell_sources(
name="scripts0",
name="shell",
)
9 changes: 8 additions & 1 deletion st2actions/bin/BUILD
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
shell_sources()
python_sources(
sources=["st2*"],
)

shell_sources(
name="shell",
skip_shellcheck=True,
)
3 changes: 3 additions & 0 deletions st2api/bin/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
python_sources(
sources=["st2*"],
)
3 changes: 3 additions & 0 deletions st2auth/bin/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
python_sources(
sources=["st2*"],
)
10 changes: 9 additions & 1 deletion st2common/bin/BUILD
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
python_sources()
python_sources(
sources=["*.py", "st2*", "!st2ctl", "!st2-self-check", "!st2-run-pack-tests"],
)

shell_sources(
name="shell",
sources=["st2ctl", "st2-self-check", "st2-run-pack-tests"],
skip_shellcheck=True,
)
3 changes: 2 additions & 1 deletion st2common/bin/migrations/v2.1/BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
python_sources()

shell_sources(
name="v2.10",
name="shell",
skip_shellcheck=True,
)
2 changes: 2 additions & 0 deletions st2common/bin/migrations/v3.5/BUILD
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# TODO: what to do about st2-migrate-db-dict-field-values ?
# st2_migrate_db_dict_field_values.py is a symlink to st2-migrate-db-dict-field-values
python_sources()
2 changes: 1 addition & 1 deletion st2common/tests/fixtures/BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
python_sources()

shell_sources(
name="fixtures0",
name="shell",
)
3 changes: 3 additions & 0 deletions st2reactor/bin/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
python_sources(
sources=["st2*"],
)
3 changes: 3 additions & 0 deletions st2stream/bin/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
python_sources(
sources=["st2*"],
)
5 changes: 4 additions & 1 deletion st2tests/integration/BUILD
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
shell_sources()
shell_sources(
name="shell",
skip_shellcheck=True,
)
1 change: 1 addition & 0 deletions st2tests/st2tests/fixtures/packs/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ resources(

shell_sources(
name="test_content_version_shell",
skip_shellcheck=True,
sources=[
"test_content_version/**/*.sh",
],
Expand Down
2 changes: 1 addition & 1 deletion st2tests/testpacks/errorcheck/actions/BUILD
Original file line number Diff line number Diff line change
@@ -1 +1 @@
shell_sources()
shell_sources(skip_shellcheck=True)
7 changes: 6 additions & 1 deletion tools/BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
python_sources()

shell_sources(
name="tools0",
name="shell",
sources=[
"*.sh",
"st2-setup-*",
],
skip_shellcheck=True,
)

0 comments on commit 11989ed

Please sign in to comment.