Skip to content

Print names of unclean files in jsonnetfmt --test and --in-place#1303

Merged
johnbartholomew merged 1 commit into
google:masterfrom
johnbartholomew:print-fmt-names
Mar 8, 2026
Merged

Print names of unclean files in jsonnetfmt --test and --in-place#1303
johnbartholomew merged 1 commit into
google:masterfrom
johnbartholomew:print-fmt-names

Conversation

@johnbartholomew
Copy link
Copy Markdown
Collaborator

Fixes #365.

And add test_cmd test cases for it.

Related go-jsonnet feature request: google/go-jsonnet#768

And add test_cmd test cases for it

Fixes google#365

Go-jsonnet feature request for it: google/go-jsonnet#768
@johnbartholomew johnbartholomew merged commit e094724 into google:master Mar 8, 2026
16 checks passed
@johnbartholomew
Copy link
Copy Markdown
Collaborator Author

Merged this prematurely - the code does the wrong thing when processing stdin (which --test supports). The code is rather confusing for this case because the utility function read_input() modifies its input file path in-place to change "-" (meaning stdin) into "" for diagnostic purposes.

But also the test coverage was insufficient to catch this.

Pushed a follow-up commit 3a7b2a5 (direct to master)

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 this pull request may close these issues.

fmt -i with multiple files should not abort on first error

1 participant