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

Better defaults for jsonnet fmt #359

Closed
sbarzowski opened this issue Sep 7, 2017 · 1 comment
Closed

Better defaults for jsonnet fmt #359

sbarzowski opened this issue Sep 7, 2017 · 1 comment

Comments

@sbarzowski
Copy link
Collaborator

Right now jsonnet fmt by default does less than I would expect, e.g. it doesn't fix indentation.

Something like jsonnet fmt -n 2 --max-blank-lines 1 --sort-imports could be the default.

I think that ideally long-term we would have something like gofmt which provides heavily opinionated, "the only true" formatting, without any knobs. Having reasonable defaults is the first step in this direction.

@sparkprime
Copy link
Contributor

My vote would be for:

-n 2 --max-blank-lines 2 --sort-imports --string-style s --comment-style s

This is what we now use internally, in the system you helped implement when you were here :)

druchoo pushed a commit to druchoo/grafonnet-lib that referenced this issue Sep 3, 2018
google/jsonnet#359

`-n 2 --max-blank-lines 2 --sort-imports --string-style s --comment-style s`
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