Mago – fast PHP linter, formatter and static analyser

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
PHPStanPHP static analysis tool
PHP Coding Standards FixerFixes your code to follow the standards
MagoExtremely fast PHP linter, formatter, and static analyzer
PsalmStatic analysis tool
PhanStatic analyzer for PHP
PHP_CodeSnifferTokenizes PHP files and detects violations
DeptracStatic code analysis tool for PHP projects
PHP Parallel LintChecks the syntax of PHP files in parallel
PHPLintSpeed up linting PHP files
PHPCompatibilityCoding standard for PHP_CodeSniffer
PHPArkitectDefine architectural rules as executable PHP code

Read our verdict in the software roundup.

PHP Code Formatters
PHP Coding Standards FixerFix coding style issues automatically
MagoFast linting, style checking and static analysis
PHP_CodeSnifferDetect violations of defined coding standards
pretty-phpApply consistent, opinionated source styling

Read our verdict in the software roundup.


Best Free and Open Source Software 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.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted