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

Config/Parameter file support #552

Closed
jkroepke opened this issue Apr 26, 2020 · 3 comments
Closed

Config/Parameter file support #552

jkroepke opened this issue Apr 26, 2020 · 3 comments

Comments

@jkroepke
Copy link

jkroepke commented Apr 26, 2020

Hi,

i'm coming from #234 but since it's closed I will open a new one.

A sharing a configuration would be eliminate a lot of issues in projects with a lot of peoples.

I read the whole thread linked above.

I understand the order of the parameters are critical and must be keep. A typical config file in json for ini wouldn't keep this approach.

So instead talking about a dedicated config file what about something like a parameter file?

For Example: shfmt -i -bn -ci -kp -w -p -q 5 -r -z9 -bd -hi -mi

Having a file like .shfmt that contains:

-i
-bn
-ci
-kp
-w
-p
-q 5 # Just a comment here.
-r
-z9
-bd
-hi
-mi

Then just run shfmt on CLI would result into the same approach.

This might be a compromise. But a great benefit on user side while it can be implement without a new concept to define a format syntax.

Feedback is much appreciated.

@mvdan
Copy link
Owner

mvdan commented Apr 26, 2020

Have you seen the README's mention of EditorConfig support?

@jkroepke
Copy link
Author

Hi,
thanks a lot for the hint! Can I also set the parser to posix (-p flag) via .editorconfig?

@jkroepke
Copy link
Author

nvm. I got it!

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

No branches or pull requests

2 participants