Skip to content

Conversation

smuppand
Copy link
Contributor

Summary

This PR addresses an issue where the ShellCheck workflow was incorrectly reporting errors on PRs due to lint violations present on the main branch.

Fixes Included

  • Adjusted .github/workflows/shell-lint.yml to:
    • Run ShellCheck only on changed .sh files during pull requests.
    • Run on all .sh files during push to main or manual dispatch.
  • Prevents unrelated errors from main from appearing in pull request checks.
  • Ensures reliable ShellCheck validation across CI triggers.

Benefits

  • Accurate linting feedback scoped only to relevant changes.
  • Cleaner CI results for contributors and reviewers.
  • Consistent behavior for main branch validation and developer PRs.

…hellCheck fixes from UFS/eMMC run.sh scripts

This change improves the scan_dmesg_errors() function to:
- Filter dmesg errors based on a scoped keyword (e.g., 'ufs', 'mmc', 'bt')
- Reduce false positives by narrowing context to relevant lines
- Log both raw snapshot and filtered messages for traceability

Also addressed ShellCheck warnings across the UFS/eMMC run.sh scripts:
- SC2012: Replaced ls with find for safer handling of filenames
- SC2034: Removed or justified unused variable assignments

Signed-off-by: Srikanth Muppandam <[email protected]>
@smuppand smuppand requested review from abbajaj806 and vnarapar July 11, 2025 11:31
- Updated  to properly differentiate between PRs and direct pushes to
- On pull_request: only runs ShellCheck on changed  files to avoid false positives from main
- On push to main and manual dispatch: runs ShellCheck on all  files in the repository
- Ensures accurate and relevant linting results on both CI and developer PRs
- Fixes issue where shellcheck errors from main were incorrectly reported on unrelated PRs

Signed-off-by: Srikanth Muppandam <[email protected]>
@smuppand smuppand force-pushed the shell-lint-workflow branch from a106b7d to 272361a Compare July 14, 2025 04:52
@smuppand smuppand closed this Jul 14, 2025
@smuppand smuppand deleted the shell-lint-workflow branch July 14, 2025 05:01
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.

1 participant