Side by side
PHP_CodeSniffer vs ShellCheck
Both stand on linters. Which one you can start free with, which one lets you read the code, and what each costs once you pay.
Free plan Self-hosted
PHP_CodeSniffer provides configurable PHP style checks and an automatic correction script. Check the PHP requirement and any additional needs imposed by individual sniffs before installing.
Visit PHP_CodeSniffer Free plan ExtensionLinuxMac+2
ShellCheck offers several ways to review shell scripts, from a browser paste to editor and CI integrations. Apple Silicon users may need a third-party build, and source compilation has a stated memory requirement.
Visit ShellCheckThe facts
| PHP_CodeSniffer | ShellCheck | |
|---|---|---|
| Free plan | Yes | Yes |
| Open source | Not published | Not published |
| Runs on | Self-hosted | Extension, Linux, Mac, Web, Windows |
| Lowest paid plan | Free or on request | Free or on request |
| Plans published | 1 | 1 |
| Maker | Not published | Not published |
| Website | github.com | shellcheck.net |
| On linters | #26 of 33 | #22 of 33 |
PHP_CodeSniffer: what it does well
- Includes multiple built-in PHP coding standards
- phpcbf can automatically correct violations
- Supports custom standards and ruleset files
- Offers a range of report formats
- Free under the BSD-3-Clause license
What to know first
- Requires PHP version 7.2.0 or greater
- Parallel processing requires PHP's PCNTL extension
- Parallel processing is disabled by default
ShellCheck: what it does well
- Free and licensed under GPLv3.
- Works through a web page, terminal or editor integrations.
- Can be added to builds and test suites.
- Offers JSON, XML, GCC-compatible and readable text output.
What to know first
- No official Apple Silicon binaries are available.
- Compiling from source requires 2 GB of RAM.
Alternatives to PHP_CodeSniffer Alternatives to ShellCheck The whole list
