Mago is a collection of PHP development tools combining linting, static analysis, code formatting and semantic checks. It provides a unified command-line interface for identifying potential defects, enforcing coding conventions and inspecting source code.
The application is designed for fast analysis of PHP projects, with separate capabilities for examining coding practices, checking type correctness and formatting source files. Developers can use the individual components independently or incorporate several checks into a common development workflow.
This is free and open source software.
Key Features
- Provides configurable lint rules for identifying suspicious code patterns and coding-practice violations.
- Performs static analysis to detect type errors and potential programming defects.
- Includes semantic checks that consider the meaning of code rather than its formatting alone.
- Automatically fixes supported lint violations.
- Formats PHP source code consistently using an integrated formatter.
- Supports configuration files for selecting rules, excluding paths and controlling analysis behaviour.
- Can inspect the concrete syntax tree produced when parsing PHP code.
- Reports diagnostics with source locations to help developers identify problems.
- Provides separate commands for linting, analysing and formatting source files.
- Supports processing entire projects rather than requiring individual files to be checked separately.
- Offers machine-readable output suitable for automated development workflows.
- Combines several categories of code-quality checks without requiring separate analysis applications.
- Cross-platform support – runs on Linux, macOS, and Windows.
Website: github.com/carthage-software/mago
Support:
Developer: Saif Eddin Gmati
License: MIT License or Apache License 2.0
Mago is written in Rust. Learn Rust with our recommended free books and free tutorials.
Related Software
| PHP Linters | |
|---|---|
| PHPStan | PHP static analysis tool |
| PHP Coding Standards Fixer | Fixes your code to follow the standards |
| Mago | Extremely fast PHP linter, formatter, and static analyzer |
| Psalm | Static analysis tool |
| Phan | Static analyzer for PHP |
| PHP_CodeSniffer | Tokenizes PHP files and detects violations |
| Deptrac | Static code analysis tool for PHP projects |
| PHP Parallel Lint | Checks the syntax of PHP files in parallel |
| PHPLint | Speed up linting PHP files |
| PHPCompatibility | Coding standard for PHP_CodeSniffer |
| PHPArkitect | Define architectural rules as executable PHP code |
Read our verdict in the software roundup.
| PHP Code Formatters | |
|---|---|
| PHP Coding Standards Fixer | Fix coding style issues automatically |
| Mago | Fast linting, style checking and static analysis |
| PHP_CodeSniffer | Detect violations of defined coding standards |
| pretty-php | Apply consistent, opinionated source styling |
Read our verdict in the software roundup.
LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more. Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion. Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README. |


Please read our Comment Policy before commenting.