Add shellcheck and ruff pre-commit hooks#106
Conversation
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>
|
Skipping CI for Draft Pull Request. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
/test all |
| # --ocp-version VERSION OCP version to collect, e.g., "X.YZ" (required) | ||
|
|
||
| set -euo pipefail | ||
| set -eu |
There was a problem hiding this comment.
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.
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
f51da6b
into
openstack-lightspeed:lcore-migration
Add shellcheck for shell script linting and ruff for Python linting and formatting to pre-commit. Fix all existing shellcheck warnings:
$POSTGRESQL_DATABASEin postgres_bootstrap.sh${CONFIG_TYPE}glob in validate-config.sh${VECTOR_DB_DIR}glob in vector_database_collect.shpullspecs_replaceatron.shwhere single-quoted sed patterns are intentionalgen-rhosls.shvector_database_collect.shPOSIX-compliant by removing bash-isms (local,pipefail). The script runs on ubi9-minimal where/bin/shhappens to bebash, but relying on that is fragile.