Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lint shell scripts and ensure consistency #793

Merged
merged 1 commit into from
Sep 11, 2019
Merged

Conversation

nfnt
Copy link
Member

@nfnt nfnt commented Sep 11, 2019

What type of PR is this?
/kind cleanup

What this PR does / why we need it:
These shell scripts have been linted with shellcheck and made consistent by

  • Using bash for all scripts
  • Indenting with 4 spaces
  • Having 'then' in the same line as 'if'
  • Using the same options for all scripts
  • Using $(...) notation instead of backticks
  • Removing grep when awk alone can do the job

This also fixes an issue with docker pull retries not working in test/run_tests.sh.

Does this PR introduce a user-facing change?:

NONE

These shell scripts have been linted with `shellcheck` and made consistent by
  * Using `bash` for all scripts
  * Indenting with 4 spaces
  * Having 'then' in the same line as 'if'
  * Using the same options for all scripts
  * Using `$(...)` notation instead of backticks
  * Removing `grep` when `awk` alone can do the job

This also fixes an issue with `docker pull` retries not working in `test/run_tests.sh`.
Copy link
Contributor

@alenkacz alenkacz left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@zen-dog zen-dog left a comment

Choose a reason for hiding this comment

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

Lgtm

Copy link
Member

@kensipe kensipe left a comment

Choose a reason for hiding this comment

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

/lgtm

@kudo-ci
Copy link

kudo-ci commented Sep 11, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alenkacz, kensipe, nfnt, zen-dog

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

The pull request process is described here

Needs approval from an approver in each of these files:

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

@kudo-ci kudo-ci added the lgtm label Sep 11, 2019
@kensipe kensipe merged commit 289be93 into master Sep 11, 2019
@kudo-ci kudo-ci deleted the nfnt/lint-shell-scripts branch September 11, 2019 12:55
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.

5 participants