Bug Fixes
- Fixed Exit Code Behavior:
Themago lint
command now correctly exits with a non-zero status code when linting errors are detected. Previously, it would exit with a zero status code even when errors were present, which could mislead CI/CD pipelines or scripts into thinking the linting passed successfully.
Impact: This ensures proper integration with automated workflows and prevents false positives in CI/CD pipelines.
Thanks: A big thank you to @thyseus for reporting this issue in #61.
Tests
- Regression Tests Added:
Tests have been added to themago_reporting
crate to ensure theget_highest_level
method inIssueCollection
correctly identifies the highest severity level. The issue stemmed from the reversed order of theLevel
enum fields, which has now been fixed. These tests prevent future regressions.
How to Upgrade
- If you installed Mago using the pre-built binary, the install script, or Homebrew, run:
mago self-update
- If you are using Composer, run:
composer require carthage-software/mago:^0.6.1 --dev
- If you are using Cargo, run:
cargo install mago@0.6.1
Why This Matters
This fix is critical for users relying on mago lint
in automated workflows, such as CI/CD pipelines, where a non-zero exit code is expected when linting errors are found. Without this fix, pipelines could incorrectly proceed despite linting failures, potentially allowing insecure or problematic code to be deployed.
Thank You
We appreciate the community’s support in making Mago better. If you encounter any issues or have suggestions, please open an issue on GitHub.
Happy linting! 🚀
Full Changelog: 0.6.0...0.6.1