File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -845,6 +845,7 @@ RUN apt-get update && apt-get dist-upgrade -yy
845
845
"""
846
846
847
847
dockerfile_base += """
848
+ RUN pip3 install beautysh
848
849
RUN pip3 install codespell
849
850
RUN pip3 install flake8
850
851
RUN pip3 install gitlint
Original file line number Diff line number Diff line change @@ -27,6 +27,8 @@ function display_help()
27
27
LINTERS_ALL=( \
28
28
commit_gitlint \
29
29
commit_spelling \
30
+ beautysh \
31
+ beautysh_sh \
30
32
clang_format \
31
33
eslint \
32
34
flake8 \
@@ -158,6 +160,22 @@ function do_commit_gitlint() {
158
160
--config " ${CONFIG_PATH} /.gitlint"
159
161
}
160
162
163
+ # We need different function style for bash/zsh vs plain sh, so beautysh is
164
+ # split into two linters. "function foo()" is not traditionally accepted
165
+ # POSIX-shell syntax, so shellcheck barfs on it.
166
+ LINTER_REQUIRE+=([beautysh]=" beautysh" )
167
+ LINTER_IGNORE+=([beautysh]=" .beautysh-ignore" )
168
+ LINTER_TYPES+=([beautysh]=" bash;zsh" )
169
+ function do_beautysh() {
170
+ beautysh --force-function-style fnpar " $@ "
171
+ }
172
+ LINTER_REQUIRE+=([beautysh_sh]=" beautysh" )
173
+ LINTER_IGNORE+=([beautysh_sh]=" .beautysh-ignore" )
174
+ LINTER_TYPES+=([beautysh_sh]=" sh" )
175
+ function do_beautysh_sh() {
176
+ beautysh --force-function-style paronly " $@ "
177
+ }
178
+
161
179
LINTER_REQUIRE+=([eslint]=" eslint;.eslintrc.json;${CONFIG_PATH} /eslint-global-config.json" )
162
180
LINTER_IGNORE+=([eslint]=" .eslintignore" )
163
181
LINTER_TYPES+=([eslint]=" json" )
You can’t perform that action at this time.
0 commit comments