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

style: check Bash style with shellcheck #5030

Merged
merged 3 commits into from Oct 8, 2018

Conversation

Projects
None yet
3 participants
@MikeMcQuaid
Copy link
Member

MikeMcQuaid commented Oct 3, 2018

This makes brew style keep our shell code consistent too. There wasn't many of these to fix so I've fixed them up too.

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew tests with your changes locally?

@colindean
Copy link
Member

colindean left a comment

👍 for bash greatness but Travis says more stuff is required

@MikeMcQuaid MikeMcQuaid force-pushed the MikeMcQuaid:style-shellcheck branch 4 times, most recently from 528920b to 3eb931f Oct 3, 2018

@commitay

This comment has been minimized.

Copy link
Contributor

commitay commented Oct 5, 2018

Maybe add an ohai to explain why style installs a formula?

$ brew style
Inspecting 702 files
..............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

702 files inspected, no offenses detected
==> Downloading https://homebrew.bintray.com/bottles/shellcheck-0.5.0.high_sierr
Already downloaded: /Users/commitay/Library/Caches/Homebrew/downloads/701df215f862a0fc600038a3ce5bf34a0adcf8eb02da004a9e3906e1fce2d3d4--shellcheck-0.5.0.high_sierra.bottle.1.tar.gz
==> Pouring shellcheck-0.5.0.high_sierra.bottle.1.tar.gz
🍺  /usr/local/Cellar/shellcheck/0.5.0: 8 files, 7MB

It seems to always be installed?

$ brew style homebrew/core

4649 files inspected, no offenses detected
==> Downloading https://homebrew.bintray.com/bottles/shellcheck-0.5.0.high_sierr
Already downloaded: /Users/commitay/Library/Caches/Homebrew/downloads/701df215f862a0fc600038a3ce5bf34a0adcf8eb02da004a9e3906e1fce2d3d4--shellcheck-0.5.0.high_sierra.bottle.1.tar.gz
==> Pouring shellcheck-0.5.0.high_sierra.bottle.1.tar.gz
🍺  /usr/local/Cellar/shellcheck/0.5.0: 8 files, 7MB

$ brew style ripgrep

1 file inspected, no offenses detected
==> Downloading https://homebrew.bintray.com/bottles/shellcheck-0.5.0.high_sierr
Already downloaded: /Users/commitay/Library/Caches/Homebrew/downloads/701df215f862a0fc600038a3ce5bf34a0adcf8eb02da004a9e3906e1fce2d3d4--shellcheck-0.5.0.high_sierra.bottle.1.tar.gz
==> Pouring shellcheck-0.5.0.high_sierra.bottle.1.tar.gz
🍺  /usr/local/Cellar/shellcheck/0.5.0: 8 files, 7MB

@MikeMcQuaid MikeMcQuaid force-pushed the MikeMcQuaid:style-shellcheck branch from 3eb931f to 5625a38 Oct 5, 2018

@MikeMcQuaid

This comment has been minimized.

Copy link
Member

MikeMcQuaid commented Oct 5, 2018

@commitay I believe all your feedback should now be addressed.

@MikeMcQuaid MikeMcQuaid force-pushed the MikeMcQuaid:style-shellcheck branch from 5625a38 to 61b3ac9 Oct 5, 2018

@commitay
Copy link
Contributor

commitay left a comment

Thanks @MikeMcQuaid!

@MikeMcQuaid MikeMcQuaid force-pushed the MikeMcQuaid:style-shellcheck branch from 61b3ac9 to b135fef Oct 7, 2018

MikeMcQuaid added some commits Oct 3, 2018

@MikeMcQuaid MikeMcQuaid force-pushed the MikeMcQuaid:style-shellcheck branch from b135fef to 39c723a Oct 7, 2018

@MikeMcQuaid MikeMcQuaid merged commit c6acab6 into Homebrew:master Oct 8, 2018

3 checks passed

codecov/patch 87.5% of diff hit (target 70.76%)
Details
codecov/project 70.78% (+0.02%) compared to 728189d
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@MikeMcQuaid MikeMcQuaid deleted the MikeMcQuaid:style-shellcheck branch Oct 8, 2018

@lock lock bot added the outdated label Nov 7, 2018

@lock lock bot locked as resolved and limited conversation to collaborators Nov 7, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.