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

Run shellcheck against scripts #4280

Merged
merged 2 commits into from
Jun 4, 2021
Merged

Run shellcheck against scripts #4280

merged 2 commits into from
Jun 4, 2021

Conversation

aledbf
Copy link
Member

@aledbf aledbf commented May 23, 2021

Fix errors reported by shellcheck and also fix generation of swagger files in supervisor-api

@aledbf aledbf force-pushed the aledbf/shellcheck branch from 5263342 to 281abae Compare May 23, 2021 22:40
@aledbf aledbf requested a review from csweichel May 23, 2021 23:31
@aledbf aledbf marked this pull request as ready for review May 23, 2021 23:32
@aledbf aledbf force-pushed the aledbf/shellcheck branch from 281abae to 3b3d67f Compare May 27, 2021 01:48
@aledbf aledbf force-pushed the aledbf/shellcheck branch from 3b3d67f to 229686d Compare May 27, 2021 02:57
@csweichel
Copy link
Contributor

How did you run shellcheck - and how can we keep running this to prevent those problems from popping up again?

@aledbf
Copy link
Member Author

aledbf commented Jun 3, 2021

How did you run shellcheck -

for script in $(find . -name *.sh);do shellcheck $script;done

and how can we keep running this to prevent those problems from popping up again?

with #4189 integrating pre-commit in the werft job
(or running pre-commit run -a before git push)

pre-commit run -a
Fix End of Files.........................................................Passed
Trim Trailing Whitespace.................................................Passed
Check for broken symlinks............................(no files to check)Skipped
Mixed line ending........................................................Passed
Forbid binaries..........................................................Passed
Non-executable shell script filename ends in .sh.........................Passed
Test shell scripts with shellcheck.......................................Failed
- hook id: shellcheck
- exit code: 1

In components/ide/theia/package-libs.sh line 26:
INTERPRETER_ORIG=$(patchelf --print-interpreter $BINARY 2>/dev/null)
                                                ^-----^ SC2086: Double quote to prevent globbing and word splitting.

Copy link
Contributor

@csweichel csweichel left a comment

Choose a reason for hiding this comment

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

We're not really using swagger anyways - please remote it :)

Otherwise LGTM.

@ghuntley
Copy link
Contributor

ghuntley commented Jun 4, 2021

convo fork: shell-check was the recipient of $1690 USD of funding from http://devxconf.org/opensource as part of https://www.gitpod.io/blog/gitpod-open-source-sustainability-fund/

2021-05-13_08-11-23

Now that we are using shell-check in our product I've set up an ongoing sponsorship of @koalaman on top of that one-time donation.

@aledbf aledbf force-pushed the aledbf/shellcheck branch from 229686d to f6fa84e Compare June 4, 2021 01:59
@aledbf aledbf merged commit ebfef31 into main Jun 4, 2021
@aledbf aledbf deleted the aledbf/shellcheck branch June 4, 2021 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants