Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Dec 4, 2024

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?

cmd/commandfuncs.go Outdated Show resolved Hide resolved
@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
33 checks passed
@mholt mholt added this to the v2.9.0-beta.4 milestone Dec 4, 2024
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