Skip to content

CI: improvements - #271

Merged
ddiss merged 3 commits into
rapido-linux:masterfrom
thackara:ci_improvements
Jun 9, 2026
Merged

CI: improvements#271
ddiss merged 3 commits into
rapido-linux:masterfrom
thackara:ci_improvements

Conversation

@thackara

@thackara thackara commented May 25, 2026

Copy link
Copy Markdown
Contributor

Raising this PR to get inputs.

  • Add lint job with shellcheck, rustfmt, and clippy to CI
  • Thinking of if cut scripts changed|added, then run rapido cut on that script, yes or no? this requires mapping of build-env and user-space env , not doing it now!

@thackara
thackara force-pushed the ci_improvements branch 2 times, most recently from 87f6314 to 8dfe17f Compare May 25, 2026 07:37

@ddiss ddiss left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Sangeetha. The changes look fine, with a couple of minor suggestions below

Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/ci.yml Outdated
Comment thread autorun/lib/fstests.sh
Comment thread autorun/fcoe_local.sh Outdated
Comment thread autorun/fstests_ntfs3.sh Outdated
Comment thread selftest/selftest.sh
Comment thread src/bin/kmod/kmod_context.rs
@thackara
thackara force-pushed the ci_improvements branch 6 times, most recently from 45d86e3 to 1e39147 Compare June 2, 2026 10:18
thackara added 3 commits June 2, 2026 16:13
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>
@thackara
thackara marked this pull request as ready for review June 2, 2026 11:33
@thackara

thackara commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

The changes look fine, with a couple of minor suggestions below

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?

@ddiss

ddiss commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

The changes look fine, with a couple of minor suggestions below

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 rust fmt changes to confirm nothing else slipped through. Sorry about the wait.

Comment thread .github/workflows/ci.yml
- name: Run Rust format check and clippy lint
run: |
cargo --version
cargo fmt --check --all

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This differs slightly from c1e3994 in that you don't filter out third_party files. Is there any reason why?

@ddiss
ddiss merged commit 0c22f5c into rapido-linux:master Jun 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants