Commit Graph

24 Commits

Author SHA1 Message Date
Oscar Utbult
61cd37b806 Update shellcheck version (0.7.2 -> 0.8.0) and fix findings 2022-11-08 11:53:57 +01:00
Oscar Utbult
421f142ffc Update shellcheck version (0.7.1 -> 0.7.2) and fix findings 2022-11-01 23:10:44 +01:00
Benjamin Elder
f72938f2d4 disable SC 1091
see: https://www.shellcheck.net/wiki/SC1091
2022-10-19 23:46:18 -07:00
Yuval Goldberg
bcb5d29e90 Fix shellcheck output streams
Resolves https://github.com/kubernetes/kubernetes/issues/102975

shellcheck errors are printed to stdout by default, hence they need to be redirected
to stderr in order to be well parsed for Junit representation by `juLog` function.
2021-10-14 15:53:47 +03:00
Benjamin Elder
f643388cb4 allo overriding docker in shellcheck 2021-03-06 13:28:58 -08:00
Benjamin Elder
7705d8c3de upgrade shellcheck to v0.7.1, use multi-arch digest 2021-03-06 13:14:28 -08:00
Benjamin Elder
5e682d1a43 fix shellcheck success / failure messages 2021-03-06 10:49:13 -08:00
Benjamin Elder
60d50f4ce8 banish .shellcheck_failures
we've eliminated these. don't allow any regression.
this should also be much faster now.
2021-03-04 16:32:17 -08:00
Ma Xinjian
a451e2ec3d Fix typo in comment of hack/verify-shellcheck.sh
Signed-off-by: Ma Xinjian <maxj.fnst@cn.fujitsu.com>
2020-09-07 16:25:44 +08:00
Jin Hase
093fd4ab02 Add comments in several hack/verify-*.sh(s-v) 2020-01-21 19:10:46 +09:00
Odin Ugedal
65a66b9d7f
Bump shellcheck to v0.7.0
Changelog:
https://github.com/koalaman/shellcheck/blob/master/CHANGELOG.md

We have some new erros due to the version bump.

- SC2034: VARIABLE_XYZ appears unused. Verify use (or export if used externally).
    - Applies to all scripts we source in other scripts
- SC2039: In POSIX sh, set option pipefail is undefined.
    - Applies to files using it with "sh" instead of "bash" in the shebang
- SC2054: Use spaces, not commas, to separate array elements.
    - Fixing Should make no difference in the code
- SC2128: Expanding an array without an index only gives the first element.
    - Fixing Should make no difference in the code
- SC2251: This ! is not on a condition and skips errexit. Use `&& exit 1` instead, or make sure $? is checked.
    - Not 100% sure if we can swap to `&& exit 1`. Applies to a lot of
    test code.

All changes should be straight forward to fix, but will be done in a
separate PR.
2019-10-23 21:32:19 +02:00
Wei Huang
6f10758446
followup of 79262 to cleanup PodPriority leftover 2019-06-28 14:19:26 -07:00
Antonio Ojea
bd65a9ca26
Fix verify-shellcheck comments
Replace  "files" instead of packages in the script
hack/verify-shellcheck.sh
2019-06-03 23:58:52 +02:00
Christoph Blecker
5236850989
Fix malformed JUNIT XML with shellcheck failures 2019-04-20 18:22:28 -07:00
Kenichi Omichi
08dc056480 Replace false with exit 1
Some scripts contained `false` for returning 1 to callers instead of
`exit 1` and that works like:

  $ false
  $ echo $?
  1
  $

But that made confusion in a PR review process.
So this replaces `false` with `exit 1` for long-term maintenance.
2019-04-16 23:13:00 +00:00
Bob Killen
db01d68d05
Update hack/verify-shellcheck.sh to ignore ./third_party/*
The ./third_party/* directory contains scripts, libraries and
other components from external sources. These should be omitted
from lints and checks with the exception of things that are
forked and modified (located in ./third_party/forked/*) for
project related reasons.
2019-04-13 16:58:20 -04:00
Benjamin Elder
2b7cc095cc enable external sources in verify-shellcheck 2019-04-01 11:03:37 -07:00
Xiang Dai
36065c6dd7 delete all duplicate empty blanks
Signed-off-by: Xiang Dai <764524258@qq.com>
2019-02-23 10:28:04 +08:00
Kenichi Omichi
4a91b593ba Use kube::util::array_contains() in hack
The common kube::util::array_contains() is already there, so this
makes both scripts use it.
2019-02-08 23:13:48 +00:00
Kenichi Omichi
c32d1acbb9 Add check-file-in-alphabetical-order for cleanup
Both verify-golint.sh and verify-shellcheck.sh have the same logic
which checks failure_file in alphabetical order.
In addition, we'd like to add another script which requires the
same logic. So this add a common function for cleanup.
2019-01-26 02:09:06 +00:00
Benjamin Elder
86a7a08af9 use host shellcheck binary when possible 2019-01-14 15:44:15 -08:00
Benjamin Elder
94fa9313ac re-use shellcheck container 2019-01-11 01:42:27 -08:00
Benjamin Elder
5c48a04c53 use shellcheck image, respect gitignore 2019-01-10 23:58:22 -08:00
Benjamin Elder
feef6e515c add shellcheck lint script 2019-01-10 23:27:13 -08:00