Skip to content

cmd: fmt prevents multiple files passed as args, add support for --config#6717

Merged
mholt merged 1 commit intocaddyserver:masterfrom
armadi1809:fmt-multiple-flags-bug
Dec 4, 2024
Merged

cmd: fmt prevents multiple files passed as args, add support for --config#6717
mholt merged 1 commit intocaddyserver:masterfrom
armadi1809:fmt-multiple-flags-bug

Conversation

@armadi1809
Copy link
Contributor

Addresses #6702 by explicitely preventing more than one config file passed to the fmt command.
Also Enables the (--config/-c) flags support for the fmt command.

@francislavoie I am not quite sure on what would be the best way to approach formatting imports as well. would we get all the import statements from the root config file and check if they refer to a file that we can resolve the path to, and then recursively do the same for the files we extracted?

@francislavoie francislavoie changed the title fmt command: prevent multiple config files passed as arguments, add support for config flag cmd: fmt prevents multiple files passed as args, add support for --config Nov 30, 2024
@armadi1809 armadi1809 force-pushed the fmt-multiple-flags-bug branch from 203a17f to df9950b Compare November 30, 2024 20:16
Copy link
Member

@mholt mholt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing this! 😃

@mholt mholt merged commit fb72793 into caddyserver:master Dec 4, 2024
@mholt mholt added this to the v2.9.0-beta.4 milestone Dec 4, 2024
mohammed90 pushed a commit to cedricziel/caddy that referenced this pull request Aug 29, 2025
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.

3 participants