Skip to content

Add shellcheck and ruff pre-commit hooks#106

Merged
openshift-merge-bot[bot] merged 1 commit into
openstack-lightspeed:lcore-migrationfrom
lpiwowar:lpiwowar/bashate
May 25, 2026
Merged

Add shellcheck and ruff pre-commit hooks#106
openshift-merge-bot[bot] merged 1 commit into
openstack-lightspeed:lcore-migrationfrom
lpiwowar:lpiwowar/bashate

Conversation

@lpiwowar
Copy link
Copy Markdown
Contributor

Add shellcheck for shell script linting and ruff for Python linting and formatting to pre-commit. Fix all existing shellcheck warnings:

  • Quote $POSTGRESQL_DATABASE in postgres_bootstrap.sh
  • Quote ${CONFIG_TYPE} glob in validate-config.sh
  • Quote ${VECTOR_DB_DIR} glob in vector_database_collect.sh
  • Suppress SC2016 in pullspecs_replaceatron.sh where single-quoted sed patterns are intentional
  • Rename unused loop variable in gen-rhosls.sh
  • Make vector_database_collect.sh POSIX-compliant by removing bash-isms (local, pipefail). The script runs on ubi9-minimal where /bin/sh happens to be bash, but relying on that is fragile.

Add shellcheck for shell script linting and ruff for Python linting
and formatting to pre-commit. Fix all existing shellcheck warnings:

- Quote $POSTGRESQL_DATABASE in postgres_bootstrap.sh
- Quote ${CONFIG_TYPE} glob in validate-config.sh
- Quote ${VECTOR_DB_DIR} glob in vector_database_collect.sh
- Suppress SC2016 in pullspecs_replaceatron.sh where
  single-quoted sed patterns are intentional
- Rename unused loop variable in gen-rhosls.sh
- Make vector_database_collect.sh POSIX-compliant by removing bash-isms
  (local, pipefail). The script runs on ubi9-minimal where /bin/sh
  happens to be bash, but relying on that is fragile.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 20, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 20, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4190aed1-e8f3-4dcc-8a31-ba46f4faee79

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@lpiwowar
Copy link
Copy Markdown
Contributor Author

/test all

@lpiwowar lpiwowar marked this pull request as ready for review May 21, 2026 17:28
@openshift-ci openshift-ci Bot requested review from Akrog and umago May 21, 2026 17:28
Copy link
Copy Markdown
Contributor

@Akrog Akrog left a comment

Choose a reason for hiding this comment

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

/lgtm

# --ocp-version VERSION OCP version to collect, e.g., "X.YZ" (required)

set -euo pipefail
set -eu
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.

nit: It would have been good to mention in the commit that the pipefail option was pointless here, since there are no pipes being used. Otherwise we wouldn't have been able to just remote the option.

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 25, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Akrog, lpiwowar, umago

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [Akrog,lpiwowar,umago]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot Bot merged commit f51da6b into openstack-lightspeed:lcore-migration May 25, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants