Skip to content

ci: ignore SC2317 only for functestlib shell library#470

Merged
bhargav0610 merged 1 commit into
qualcomm-linux:mainfrom
smuppand:custom_workflow
Jun 3, 2026
Merged

ci: ignore SC2317 only for functestlib shell library#470
bhargav0610 merged 1 commit into
qualcomm-linux:mainfrom
smuppand:custom_workflow

Conversation

@smuppand
Copy link
Copy Markdown
Contributor

@smuppand smuppand commented Jun 1, 2026

Update the ShellCheck workflow to handle SC2317 only for Runner/utils/[functestlib.sh](http://functestlib.sh/).

[functestlib.sh](http://functestlib.sh/) is a sourced helper library used by many suite [run.sh](http://run.sh/) tests. Some helper functions are invoked indirectly, so ShellCheck can report SC2317 when the library is linted as a standalone shell file.

All other shell files remain under the existing strict ShellCheck policy.Update the ShellCheck workflow to handle SC2317 only for Runner/utils/[functestlib.sh](http://functestlib.sh/).

[functestlib.sh](http://functestlib.sh/) is a sourced helper library used by many suite [run.sh](http://run.sh/) tests. Some helper functions are invoked indirectly, so ShellCheck can report SC2317 when the library is linted as a standalone shell file.

All other shell files remain under the existing strict ShellCheck policy.

Runner/utils contains sourced helper libraries whose functions are called
indirectly by suite run.sh files. When these libraries are linted as
standalone shell files, ShellCheck can report SC2317 even though the
functions are reachable from tests.

Update the ShellCheck workflow to use a per-file lint policy:
- ignore SC2317 for sourced utility libraries
- keep SC2317 enabled for standalone scripts and suite run.sh files

Library mode applies only to:
- Runner/utils/functestlib.sh
- Runner/utils/lib_*.sh
- Runner/utils/*_common.sh

This keeps unreachable-code detection enabled for normal test scripts
while avoiding false failures for shared sourced libraries.

Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
@smuppand smuppand requested review from abbajaj806 and vnarapar June 1, 2026 10:41
@smuppand smuppand requested a review from bhargav0610 June 2, 2026 01:48
@smuppand smuppand marked this pull request as draft June 3, 2026 04:53
@bhargav0610 bhargav0610 marked this pull request as ready for review June 3, 2026 05:03
@bhargav0610 bhargav0610 merged commit d21b841 into qualcomm-linux:main Jun 3, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants