Skip to content

chore: Analysis checks and fixes in CI - #187

Merged
rm3l merged 1 commit into
redhat-developer:mainfrom
OpinionatedHeron:analysisCheck
Jul 16, 2025
Merged

chore: Analysis checks and fixes in CI#187
rm3l merged 1 commit into
redhat-developer:mainfrom
OpinionatedHeron:analysisCheck

Conversation

@OpinionatedHeron

@OpinionatedHeron OpinionatedHeron commented Jul 15, 2025

Copy link
Copy Markdown
Member

Description of the change

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

How to test changes / Special notes to the reviewer

Checklist

  • For each Chart updated, version bumped in the corresponding Chart.yaml according to Semantic Versioning.
  • For each Chart updated, variables are documented in the values.yaml and added to the corresponding README.md. The pre-commit utility can be used to generate the necessary content. Use pre-commit run -a to apply changes. The pre-commit Workflow will do this automatically for you if needed.
  • JSON Schema template updated and re-generated the raw schema via the pre-commit hook.
  • Tests pass using the Chart Testing tool and the ct lint command.
  • If you updated the orchestrator-infra chart, make sure the versions of the Knative CRDs are aligned with the versions of the CRDs installed by the OpenShift Serverless operators declared in the values.yaml file. See Installing Knative Eventing and Knative Serving CRDs for more details.

Summary by Sourcery

Add differential ShellCheck CI checks for shell scripts and fix detected issues in install.sh

New Features:

  • Add a GitHub Actions workflow (scripts-checks.yaml) to run differential ShellCheck linting on .sh files

Enhancements:

  • Fix spelling typo and enforce variable and path quoting in install.sh to satisfy ShellCheck

CI:

  • Integrate the new Differential ShellCheck workflow into the main branch for both push and pull_request events

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

sourcery-ai Bot commented Jul 15, 2025

Copy link
Copy Markdown

Reviewer's Guide

This PR adds a new GitHub Actions workflow to run differential ShellCheck on shell scripts and uploads SARIF artifacts, and fixes minor typos and quoting issues in the install shell script.

Flow diagram for ShellCheck workflow steps in CI

flowchart TD
  Checkout[Repository checkout]
  ShellCheck[Run Differential ShellCheck]
  Upload[Upload SARIF artifact]

  Checkout --> ShellCheck --> Upload
Loading

File-Level Changes

Change Details Files
Add Differential ShellCheck workflow to CI
  • Introduce scripts-checks.yaml under .github/workflows
  • Configure triggers for pushes and pull requests on .sh and workflow files
  • Checkout full git history for differential analysis
  • Run redhat-plumbers-in-action/differential-shellcheck action
  • Upload ShellCheck defects as SARIF artifact
.github/workflows/scripts-checks.yaml
Fix syntax and comments in install.sh
  • Correct typo in comment for non-existent namespace
  • Quote file path in oc create configmap to prevent word splitting
.rhdh/scripts/install.sh

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

@sonarqubecloud

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

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 and they look great!


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.

/lgtm

@openshift-ci openshift-ci Bot added the lgtm label Jul 16, 2025
@rm3l
rm3l merged commit d4056d0 into redhat-developer:main Jul 16, 2025
9 of 10 checks passed
@OpinionatedHeron
OpinionatedHeron deleted the analysisCheck branch August 20, 2025 09:27
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.

2 participants