-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Always print source of formatted file unless --check is specified (#2205
) This PR was already merged in #2173, but main was subsequently forced pushed as part of the 0.4.0 release and these changes were erased by mistake. This PR changes the behaviour of the formatter when run on files that are already formatted. Previously the source of a file that was already formatted was not output by the formatter. After this PR, the formatter always outputs the contents of a formatted file (when used on a single file, and if the --check option is not specified). If the `format: false` pragma is set then the source is echoed verbatim, without highlighting (because it's not possible to get the highlighting without the formatting). This probably helps implementing the formatter in the vscode extension, see anoma/vscode-juvix#98
- Loading branch information
1 parent
dd16274
commit 7840f9f
Showing
4 changed files
with
84 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters