Skip to content

Commit 915a472

Browse files
committed
ci: fix static analysis
1 parent e7fc336 commit 915a472

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Runfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ end
2121

2222
help "Run shellcheck on all examples"
2323
action :shellcheck do
24+
allowed_skips = 1
2425
Example.executables.each do |example|
2526
if File.exist? example
2627
success = system "shellcheck #{example}"
@@ -29,15 +30,26 @@ action :shellcheck do
2930
exit 1 unless success
3031
else
3132
say "- skip !txtcyn!#{example}"
33+
allowed_skips -= 1
34+
if allowed_skips < 0
35+
say "- aborted: too many skips"
36+
exit 1
37+
end
3238
end
3339
end
3440
end
3541

3642
help "Run shfmt checks on all examples"
3743
action :shfmt do
44+
allowed_skips = 2
3845
Example.executables.each do |example|
3946
if example == 'examples/heredoc/cli' || !File.exist?(example)
4047
say "- skip !txtcyn!#{example}"
48+
allowed_skips -= 1
49+
if allowed_skips < 0
50+
say "- aborted: too many skips"
51+
exit 1
52+
end
4153
next
4254
end
4355

0 commit comments

Comments
 (0)