https://github.com/assertwell/shellcheck
Expose ShellCheck as a vendor binary for PHP projects
https://github.com/assertwell/shellcheck
composer-package shellcheck
Last synced: 4 months ago
JSON representation
Expose ShellCheck as a vendor binary for PHP projects
- Host: GitHub
- URL: https://github.com/assertwell/shellcheck
- Owner: assertwell
- License: other
- Created: 2022-02-08T15:06:34.000Z (about 4 years ago)
- Default Branch: develop
- Last Pushed: 2022-02-09T15:45:54.000Z (almost 4 years ago)
- Last Synced: 2025-10-13T06:06:16.099Z (4 months ago)
- Topics: composer-package, shellcheck
- Language: Shell
- Homepage:
- Size: 10.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# ShellCheck
[Vidar Holen's ShellCheck is an invaluable tool for troubleshooting shell scripts](https://www.shellcheck.net), and this package makes it easy to import into the testing pipeline of your PHP-based project!
## How it works
This package contains a `bin/shellcheck` script that serves as a proxy to the system-installed copy of ShellCheck; if the ShellCheck binary is found, arguments pass through to it normally. If ShellCheck is **not** found locally, users are presented with the following notice:
> ShellCheck was not found in your $PATH!
> Please visit https://github.com/koalaman/shellcheck#installing for installation instructions.
Normally, this would result in a non-zero exit code (2), though this behavior may be suppressed with the `--ignore-missing` option:
```none
$ vendor/bin/shellcheck --ignore-missing some-script.sh
ShellCheck was not found in your $PATH!
Please visit https://github.com/koalaman/shellcheck#installing for installation instructions.
$ echo $?
0
```
## Installation
The easiest way to install this package is via [Composer](https://getcomposer.org):
```sh
$ composer require --dev assertwell/shellcheck
```
You may wish to add a [Composer script](https://getcomposer.org/doc/articles/scripts.md) to make it easier for team members to run ShellCheck:
```jsonc
# composer.json
{
// ...
"scripts": {
"test:shellcheck": [
"shellcheck bin/*"
]
},
"scripts-descriptions": [
"test:shellcheck": "Lint shell scripts via ShellCheck"
]
}
```
As for the installation of ShellCheck itself, please [see the instructions most-relevant to your environment in the ShellCheck documentation](https://github.com/koalaman/shellcheck#installing).
## License
[The assertwell/shellcheck Composer package is available under the MIT license](LICENSE.md).
ShellCheck itself is the copyright of Vidar Holden and made [available under the GPLv3 license](https://github.com/koalaman/shellcheck/blob/master/LICENSE).