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

feat: adding a feature to load config file located other than workind directory #29

Closed
daisuke834 opened this issue Aug 25, 2022 · 2 comments · Fixed by #30
Closed

feat: adding a feature to load config file located other than workind directory #29

daisuke834 opened this issue Aug 25, 2022 · 2 comments · Fixed by #30
Milestone

Comments

@daisuke834
Copy link

daisuke834 commented Aug 25, 2022

I am very interested in this tool.

As written in the README.md, .yamlfmt configuration file is automatically loaded from the working directory, but it doesn't seem to have a feature to optionally specify the path of the config file to be loaded. For example, other tool such as yamllint has an option -c like this:

yamllint -c path/to/yamllint.yaml foo.yaml

https://github.com/adrienverge/yamllint#usage

yamlfmt seems to have the following three options only at this moment.

$ ./yamlfmt --help
Usage of ./yamlfmt:
  -dry
    	Perform a dry run; show the output of a formatting
    	operation without performing it.
  -in
    	Format yaml read from stdin and output to stdout
  -lint
    	Check if there are any differences between
    	source yaml and formatted yaml.

I know my sudden post and request might be impolite, but may I ask a favor of you to add a feature to optionally specify the path of config file to be loaded?

@braydonk
Copy link
Collaborator

Thank you for the suggestion! This is actually something I meant to do right from the beginning, but I forgot to and it slipped my mind. Should be trivial. I'll include it in v0.3.0. Thank you for your interest and patience!

@daisuke834
Copy link
Author

@braydonk
Thank you so much for your very quick action!!!

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 a pull request may close this issue.

2 participants