diff options
| author | Charles Brunet <charles.brunet@optelgroup.com> | 2023-09-15 10:19:02 -0400 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2024-04-08 10:43:57 -0700 |
| commit | 2b37101998c82b8c4d3985d9b0695be38ec4cf76 (patch) | |
| tree | 1768a7bb40fd5ceab99dd0c10899051049d282ea /mesonbuild/mesonmain.py | |
| parent | bd4fd9073081bcc9f4505b9604c5cb1e8cdc300f (diff) | |
| download | meson-2b37101998c82b8c4d3985d9b0695be38ec4cf76.tar.gz | |
meson format command
Diffstat (limited to 'mesonbuild/mesonmain.py')
| -rw-r--r-- | mesonbuild/mesonmain.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mesonbuild/mesonmain.py b/mesonbuild/mesonmain.py index c01be49e5..62ed8918c 100644 --- a/mesonbuild/mesonmain.py +++ b/mesonbuild/mesonmain.py @@ -61,7 +61,7 @@ def errorhandler(e: Exception, command: str) -> int: class CommandLineParser: def __init__(self) -> None: # only import these once we do full argparse processing - from . import mconf, mdist, minit, minstall, mintro, msetup, mtest, rewriter, msubprojects, munstable_coredata, mcompile, mdevenv + from . import mconf, mdist, minit, minstall, mintro, msetup, mtest, rewriter, msubprojects, munstable_coredata, mcompile, mdevenv, mformat from .scripts import env2mfile from .wrap import wraptool import shutil @@ -100,6 +100,8 @@ class CommandLineParser: help_msg='Run commands in developer environment') self.add_command('env2mfile', env2mfile.add_arguments, env2mfile.run, help_msg='Convert current environment to a cross or native file') + self.add_command('format', mformat.add_arguments, mformat.run, aliases=['fmt'], + help_msg='Format meson source file') # Add new commands above this line to list them in help command self.add_command('help', self.add_help_arguments, self.run_help_command, help_msg='Print help of a subcommand') |
