Skip to main content

Fix

This command applies automated code fixes to your Dart files using dart fix. It identifies and resolves common issues, such as unused imports, missing const modifiers, and outdated syntax.

morpheme fix

Description

The fix command is a productivity tool that automatically corrects analysis issues flagged by the compiler. It supports scoping, allowing you to target the entire project or specific modules.

danger

This command modifies your source code. While dart fix is generally safe, it is highly recommended to commit your changes or run with --dry-run first.

Usage

Fix Entire Project

Apply fixes to all apps, core packages, and features in the workspace.

morpheme fix

Dry Run (Preview)

See what changes would be made without actually modifying any files.

morpheme fix --dry-run

Fix Scoped Components

Fix a specific app:

morpheme fix -a driver

Fix a specific feature:

morpheme fix -f auth

Fix a specific page:

morpheme fix -f auth -p login

Options

morpheme fix [options]

To see all available options and flags, run morpheme fix --help.

Available Options

OptionAbbrDescription
--apps-name-aApply fixes to a specific app.
--feature-name-fApply fixes to a specific feature.
--page-name-pApply fixes to a specific page (requires -f).
--dry-runShow what fixes would be applied without making changes.