CI: improvements - #271
Conversation
87f6314 to
8dfe17f
Compare
ddiss
left a comment
There was a problem hiding this comment.
Thanks Sangeetha. The changes look fine, with a couple of minor suggestions below
45d86e3 to
1e39147
Compare
address failures caught by `shellcheck`
|
| In autorun/fcoe_local.sh line 121:
| while [ ! -d /sys/class/fc_remote_ports/rport-* ]; do
| ^-- SC2144 (error): -d doesn't work with globs. Use a for loop.
|
|
| In autorun/fcoe_local.sh line 133:
| for b in "${target}/${hctl}/block/*"; do
| ^-------------------------^ SC2066 (error): Since you double quoted this, it will not word split, and the loop will only run once.
|
|
| In autorun/fstests_ntfs3.sh line 11:
| ln -s "${mkfsbin}" "${mkfsbin}3" || break
| ^---^ SC2105 (error): break is only valid in loops.
|
|
| In autorun/ocfs2.sh line 39:
| for i in $(ls /sys/block); do
| ^--------------^ SC2045 (error): Iterating over ls output is fragile. Use globs.
|
|
| In autorun/openiscsi.sh line 39:
| for i in $(ls /etc/iscsi/nodes/*/*/default); do
| ^-- SC2045 (error): Iterating over ls output is fragile. Use globs.
|
|
| In cut/fstests_xfs.sh line 17:
| [[ ${man_deps[@]} == ${man_deps[@]%.gz} ]] || man_deps+=(zcat gzip)
| ^------------^ SC2199 (error): Arrays implicitly concatenate in [[ ]]. Use a loop (or explicit * instead of @).
| ^----------------^ SC2199 (error): Arrays implicitly concatenate in [[ ]]. Use a loop (or explicit * instead of @).
|
|
| In cut/fstests_xfs.sh line 18:
| [[ ${man_deps[@]} == ${man_deps[@]%.bz2} ]] || man_deps+=(bzcat)
| ^------------^ SC2199 (error): Arrays implicitly concatenate in [[ ]]. Use a loop (or explicit * instead of @).
| ^-----------------^ SC2199 (error): Arrays implicitly concatenate in [[ ]]. Use a loop (or explicit * instead of @).
|
|
| In cut/fstests_xfs.sh line 19:
| [[ ${man_deps[@]} == ${man_deps[@]%.xz} ]] || man_deps+=(xzcat)
| ^------------^ SC2199 (error): Arrays implicitly concatenate in [[ ]]. Use a loop (or explicit * instead of @).
| ^----------------^ SC2199 (error): Arrays implicitly concatenate in [[ ]]. Use a loop (or explicit * instead of @).
|
|
| In selftest/selftest.sh line 60:
| for t in $(ls "selftest/test/"${filter}); do
| ^-----------------------------^ SC2045 (error): Iterating over ls output is fragile. Use globs.
|
| For more information:
| https://www.shellcheck.net/wiki/SC2045 -- Iterating over ls output is fragi...
| https://www.shellcheck.net/wiki/SC2066 -- Since you double quoted this, it ...
| https://www.shellcheck.net/wiki/SC2105 -- break is only valid in loops.
Changes include:
- Replace `ls` output with safe bash globs SC2045
- Fixed path resolution when migrating away from `ls` basenames.
- Fixed `break` (SC2105).
- Replaced implicit array concatenation in `[[ ]]` tests with explicit
expansion syntax (SC2199).
- Replaced unsafe dir glob inside `[ -d ]` SC2144.
- Fixed SC2166.
Signed-off-by: Sangeetha Thackarajan <sangeetha.thackarajan@suse.com>
this is purely formatting change with no functional alterations (done in preparation for new CI/lint job). cmd: `git ls-files "*.rs" | grep -v "^src/third_party" | xargs rustfmt` Signed-off-by: Sangeetha Thackarajan <sangeetha.thackarajan@suse.com>
Signed-off-by: Sangeetha Thackarajan <sangeetha.thackarajan@suse.com>
Thanks David, I have addressed the suggestions. The implementation now passes shellcheck, rustfmt, and clippy lints (with warnings allowed). Do you have any further comments, suggestions, or questions I should address? |
All looks good to go in Sangeetha :) I just wanted to have a closer look at the |
| - name: Run Rust format check and clippy lint | ||
| run: | | ||
| cargo --version | ||
| cargo fmt --check --all |
There was a problem hiding this comment.
This differs slightly from c1e3994 in that you don't filter out third_party files. Is there any reason why?
Raising this PR to get inputs.