File tree Expand file tree Collapse file tree
testpacks/errorcheck/actions Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8888
8989shell_sources (
9090 name = "root" ,
91+ skip_shfmt = True ,
9192)
9293
9394file (
Original file line number Diff line number Diff line change @@ -2,4 +2,5 @@ st2_shell_sources_and_resources(
22 name = "send_mail" ,
33 sources = ["send_mail" ],
44 skip_shellcheck = True ,
5+ skip_shfmt = True ,
56)
Original file line number Diff line number Diff line change @@ -3,4 +3,7 @@ python_sources()
33shell_sources (
44 name = "shell" ,
55 skip_shellcheck = True ,
6+ overrides = {
7+ "print_to_stdout_and_stderr.sh" : dict (skip_shfmt = True ),
8+ }
69)
Original file line number Diff line number Diff line change 1- shell_sources ()
1+ shell_sources (skip_shfmt = True )
Original file line number Diff line number Diff line change 11shell_sources (
2+ skip_shfmt = True ,
23 overrides = {
34 "random2.sh" : dict (skip_shellcheck = True ),
45 },
Original file line number Diff line number Diff line change @@ -3,4 +3,5 @@ python_sources()
33shell_sources (
44 name = "shell" ,
55 skip_shellcheck = True ,
6+ skip_shfmt = True ,
67)
Original file line number Diff line number Diff line change @@ -181,6 +181,7 @@ def st2_shell_sources_and_resources(**kwargs):
181181 shell_sources (** kwargs ) # noqa: F821
182182
183183 kwargs .pop ("skip_shellcheck" , None )
184+ kwargs .pop ("skip_shfmt" , None )
184185
185186 kwargs ["name" ] += "_resources"
186187 resources (** kwargs ) # noqa: F821
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ backend_packages = [
2626 # shell
2727 " pants.backend.shell" ,
2828 " pants.backend.shell.lint.shellcheck" ,
29+ " pants.backend.shell.lint.shfmt" ,
2930
3031 # packaging
3132 " pants.backend.experimental.makeself" ,
@@ -236,6 +237,15 @@ config = "@lint-configs/regex-lint.yaml"
236237[setuptools ]
237238install_from_resolve = " st2"
238239
240+ [shfmt ]
241+ args = [
242+ # https://github.com/mvdan/sh/blob/master/cmd/shfmt/shfmt.1.scd#printer-flags
243+ " --indent" ,
244+ " 4" , # default is 0 (use tabs)
245+ " --case-indent" ,
246+ " --simplify" ,
247+ ]
248+
239249[test ]
240250extra_env_vars = [
241251 # Use this so that the test system does not require the stanley user.
Original file line number Diff line number Diff line change @@ -2,4 +2,5 @@ python_sources()
22
33shell_sources (
44 name = "shell" ,
5+ skip_shfmt = True ,
56)
Original file line number Diff line number Diff line change 1- shell_sources ()
1+ shell_sources (
2+ overrides = {
3+ (
4+ "add-itest-user-key.sh" ,
5+ "permissions-workaround.sh" ,
6+ "run-nightly-make-task-if-exists.sh" ,
7+ "submit-codecov-coverage.sh" ,
8+ "time-command.sh" ,
9+ ): dict (skip_shfmt = True ),
10+ },
11+ )
You can’t perform that action at this time.
0 commit comments