Skip to content

chore: Analysis checks and fixes in CI - #58

Merged
rm3l merged 5 commits into
redhat-developer:mainfrom
OpinionatedHeron:analysisChecks
Jul 15, 2025
Merged

chore: Analysis checks and fixes in CI#58
rm3l merged 5 commits into
redhat-developer:mainfrom
OpinionatedHeron:analysisChecks

Conversation

@OpinionatedHeron

@OpinionatedHeron OpinionatedHeron commented Jul 10, 2025

Copy link
Copy Markdown
Member

Description

Added scripts-checks.yaml to run shell checks on the entry scripts. Fixed any issues detected when running the check.

Which issue(s) does this PR fix or relate to

RHDHBUGS-790

PR acceptance criteria

  • Tests
  • Documentation

How to test changes / Special notes to the reviewer

Run the script - should function as normal. Any errors should be detected, stopping the script if applicable.

Summary by Sourcery

Enable differential ShellCheck linting for shell scripts in CI and apply fixes to entry scripts.

Enhancements:

  • Quote EXTRA_CLI_ARGS in wait-for-plugins-and-start.sh to resolve ShellCheck warnings.

CI:

  • Add GitHub Actions workflow (.github/workflows/scripts-checks.yaml) to run differential ShellCheck on .sh files and the workflow config.

Chores:

  • Include generated/app-config.patched.yaml as the placeholder for the patched application configuration.

Signed-off-by: Leanne Ahern <lahern@redhat.com>
@sourcery-ai

sourcery-ai Bot commented Jul 10, 2025

Copy link
Copy Markdown
Contributor

Reviewer's Guide

Introduces a Differential ShellCheck workflow to lint shell scripts on CI and resolves shellcheck-detected issues by fixing script quoting and adding a patched config file.

Flow diagram for ShellCheck CI job steps

flowchart TD
  A[Repository checkout] --> B[Differential ShellCheck]
  B --> C[Upload SARIF artifact]
Loading

File-Level Changes

Change Details Files
Introduce a Differential ShellCheck CI workflow
  • Add a new GitHub Actions workflow to lint .sh files
  • Configure push and pull_request triggers on main
  • Checkout full git history and upload SARIF artifacts
.github/workflows/scripts-checks.yaml
Fix quoting in the startup script per ShellCheck advice
  • Wrap EXTRA_CLI_ARGS in quotes to prevent word splitting
  • Adjust the exec command invocation accordingly
wait-for-plugins-and-start.sh
Add a placeholder for the patched app config
  • Introduce generated/app-config.patched.yaml as the patched config file
generated/app-config.patched.yaml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@openshift-ci
openshift-ci Bot requested review from gazarenkov and zdrapela July 10, 2025 09:58
@github-advanced-security

Copy link
Copy Markdown

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey @OpinionatedHeron - I've reviewed your changes - here's some feedback:

  • In wait-for-plugins-and-start.sh, quoting EXTRA_CLI_ARGS as a single string may collapse multiple arguments into one—consider using array or unquoted expansion ($EXTRA_CLI_ARGS) to preserve splitting.
  • For improved maintainability, consider referencing actions by semantic version tags instead of full commit SHAs in .github/workflows/scripts-checks.yaml.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In wait-for-plugins-and-start.sh, quoting EXTRA_CLI_ARGS as a single string may collapse multiple arguments into one—consider using array or unquoted expansion (`$EXTRA_CLI_ARGS`) to preserve splitting.
- For improved maintainability, consider referencing actions by semantic version tags instead of full commit SHAs in .github/workflows/scripts-checks.yaml.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@rm3l rm3l left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A few comments on the pinned digests, but LGTM overall.

Comment thread .github/workflows/scripts-checks.yaml Outdated
Comment thread .github/workflows/scripts-checks.yaml Outdated

@rm3l rm3l left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci Bot added the lgtm label Jul 15, 2025
@rm3l
rm3l merged commit 6d69e61 into redhat-developer:main Jul 15, 2025
15 checks passed
@OpinionatedHeron
OpinionatedHeron deleted the analysisChecks branch September 24, 2025 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants