https://github.com/intrepidpursuits/danger-shellcheck
Danger plugin for Shellcheck (https://github.com/koalaman/shellcheck)
https://github.com/intrepidpursuits/danger-shellcheck
Last synced: 8 months ago
JSON representation
Danger plugin for Shellcheck (https://github.com/koalaman/shellcheck)
- Host: GitHub
- URL: https://github.com/intrepidpursuits/danger-shellcheck
- Owner: IntrepidPursuits
- License: mit
- Created: 2017-04-03T19:17:51.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-07T15:52:15.000Z (about 9 years ago)
- Last Synced: 2024-04-25T20:20:25.414Z (about 2 years ago)
- Language: Ruby
- Size: 12.7 KB
- Stars: 2
- Watchers: 11
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# danger-shellcheck
[](https://travis-ci.org/IntrepidPursuits/danger-shellcheck)
[](https://coveralls.io/github/IntrepidPursuits/danger-shellcheck?branch=master)

A [Danger](http://danger.systems/) plugin that shows the static analysis output generated by [ShellCheck](https://github.com/koalaman/shellcheck).
To use this plugin, you need to generate a JSON file using [ShellCheck](https://github.com/koalaman/shellcheck) for this plugin to read.
## Installation
$ gem install danger-shellcheck
## Usage
Somewhere in your build process, call ShellCheck using the JSON output flag.
shellcheck -f json myscript myotherscript > shellcheck.json
An easy way to have shellcheck look at all of your .sh files is:
shellcheck -f json **/*.sh > shellcheck.json
At a minimum, add this line to your `Dangerfile`:
shellcheck.report 'shellcheck.json'
You may also use optional specifiers to ignore files, or set the project root.
# Set a different project root
shellcheck.project_root = 'MyProject/NewRoot/'
## License
danger-shellcheck is released under the MIT license. See [LICENSE](https://github.com/IntrepidPursuits/danger-shellcheck/blob/master/LICENSE) for details.
## Contributing
1. Fork this repo
2. Run `bundle install` to setup dependencies.
3. Run `bundle exec rake spec` to run the tests.
4. Use `bundle exec guard` to automatically have tests run as you make changes.
5. Make your changes.
6. Create a Pull Request for us to review