Skip to content

Conversation

@durkode
Copy link
Contributor

@durkode durkode commented Jul 19, 2018

This PR enables options to be passed to the shellcheck docker image, usage as such:

steps:
  - plugins:
      shellcheck#v1.0.1:
        files: scripts/*.sh
        options:
          - --exclude=SC2207,SC2154
          - --format=gcc

When making a release from this, please update the Readme to reflect this.

@durkode durkode mentioned this pull request Jul 19, 2018
@joscha
Copy link

joscha commented Aug 21, 2018

@lox can we get this in, please?

fi

# Read in the options to pass to shellcheck
mapfile -t options<<<"$(plugin_read_list OPTIONS)"
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm mildly concerned that this pattern comes with a bash 4.x+ requirement.

Copy link
Contributor

@toolmantim toolmantim Aug 21, 2018

Choose a reason for hiding this comment

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

If I'm not mistaken, does this mean I can't run the shellcheck plugin anymore via bksr on my Mac? (bash 3.2)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, I didn't realise mapfile was 4.x+. This has been merged already but if this is an issue you should be able to change it back to options=( $(plugin_read_list OPTIONS) ), which ironically wouldn't pass SC2207.

Copy link
Contributor

Choose a reason for hiding this comment

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

I wish MacOS wasn’t so behind the times 😢

Copy link
Contributor

Choose a reason for hiding this comment

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

Fixed in #15.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also updated the Shellcheck wiki 😅https://github.com/koalaman/shellcheck/wiki/SC2207

Copy link
Contributor

Choose a reason for hiding this comment

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

🙏🏼

@lox
Copy link
Contributor

lox commented Aug 21, 2018

Thanks for the ping @joscha. Let's just ship this.

@lox lox merged commit e560f13 into buildkite-plugins:master Aug 21, 2018
@lox
Copy link
Contributor

lox commented Aug 21, 2018

Behold: https://github.com/buildkite-plugins/shellcheck-buildkite-plugin/releases/tag/v1.1.0

Thanks very much @durkode, sorry it took us so long. 🙇🏼‍♂️

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.

4 participants