Closed corneliusroemer closed 5 months ago
I think -print_conf
is a currently unreleased feature (I haven't cut a release in a while). I just compiled and tried it on the latest commit and it seems to work:
braydonk@braydonk:~/Git/yamlfmt_upstream$ ./yamlfmt -print_conf
continue_on_error: false
doublestar: false
exclude: []
extensions:
- yaml
- yml
gitignore_excludes: false
gitignore_path: .gitignore
include: []
line_ending: lf
output_format: default
regex_exclude: []
formatter:
disallow_anchors: false
drop_merge_tag: false
include_document_start: false
indent: 2
indentless_arrays: false
line_ending: lf
max_line_length: 0
pad_line_comments: 1
retain_line_breaks: false
retain_line_breaks_single: false
scan_folded_as_literal: false
type: basic
So if you have Go installed and are able, then the feature should be available if you do go install github.com/google/yamlfmt@main
.
Not sure when the next release will be at the moment, I have one other thing I wanted to get done but not much time to do it. If I don't think I'll be able to fit in the other fix I was going to do I'll release soon.
This is released in v0.13.0!
Per the documentation https://github.com/google/yamlfmt/edit/main/docs/command-usage.md I should be able to run
yamlfmt -print_conf
But when I run this on version
0.12.0
I get an error:I'm using the homebrew installed version on an M1 running macOS 14.5. But the go compiled one has the same issue.