Skip to content

Conversation

@Michael4d45
Copy link

📌 What Does This PR Do?

Add format presets to build out the mago.toml when running mago init.

🔍 Context & Motivation

If people want to migrate from pint or php-cs-fixer, this could be a nice to have.

Addresses: #444

🛠️ Summary of Changes

  • Feature: Added --import-fmt flag to mago init
mago init --help
Initialize a new Mago configuration file.

Creates a new `mago.toml` configuration file in the workspace directory with default settings. This command is interactive and will prompt for various options
if not provided via command-line arguments.

**Usage**: `mago init`

Usage: mago init [OPTIONS]

Options:
      --import-fmt <IMPORT_FMT>
          The name of a preset formatter configuration to import

  -h, --help
          Print help (see a summary with '-h')

📂 Affected Areas

  • Linter
  • Formatter
  • CLI
  • Composer Plugin
  • Dependencies
  • Documentation
  • Other (please specify):

🔗 Related Issues or PRs

Addresses: #444

📝 Notes for Reviewers

There isn't a 1-1 mapping of php cs fixer rules to mago formatting rules, but this could be a good start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant