github carthage-software/mago 0.6.2
Mago 0.6.2

latest releases: 1.0.0-beta.13, 1.0.0-beta.12, 1.0.0-beta.11...
7 months ago

Bug Fixes

  • Fixed Non-Zero Exit Code for Warnings/Notes:
    In version 0.6.1, we fixed the exit code behavior to ensure mago lint exits with a non-zero code when errors are present. However, this inadvertently caused the command to exit with a non-zero code even when only warnings, notes, or help messages were present. This has now been fixed.
    Fix: Replaced the logic level <= Level::Error with the cleaner has_minimum_level(Level::Error) method, which correctly checks if any issues meet or exceed the error level.
    Impact: The CLI now correctly exits with a non-zero code only when errors are present, allowing warnings, notes, and help messages to pass without failing the linting process.

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! 🚀

Don't miss a new mago release

NewReleases is sending notifications on new releases.