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

Simple, single line output when there is a file with incorrect formatting #161

Closed
nogweii opened this issue Feb 28, 2024 · 2 comments · Fixed by #170
Closed

Simple, single line output when there is a file with incorrect formatting #161

nogweii opened this issue Feb 28, 2024 · 2 comments · Fixed by #170

Comments

@nogweii
Copy link

nogweii commented Feb 28, 2024

So that yamlfmt's output can be parsed by other tools to highlight which files need to be fixed, like reviewdog. Much like the existing -quiet flag, but without the preamble.

I'd imagine taking the existing -quiet output:

2024/02/28 15:23:20 The following files will have formatting changes:

foo/bar.yaml

and turning it into:

foo/bar.yaml: [warning] the file is not formatted correctly

(The exact wording is not required, just a demonstration.)

@braydonk
Copy link
Collaborator

braydonk commented Mar 8, 2024

Hi @nogweii,

Thanks for the suggestion. It's not the first time someone's asked for something like this, I'll find a way to address it. I think I'll come up with some sort of adapter setup so it's possible to implement other kinds of output formats. Will work on this when I have time over the next week.

@braydonk
Copy link
Collaborator

braydonk commented May 3, 2024

This feature is now released in v0.12.0

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