-
Notifications
You must be signed in to change notification settings - Fork 0
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
Support comments to skip formatting #86
base: main
Are you sure you want to change the base?
Conversation
If I only have a single In the first case i would expect to turn of formatting as long as there is no Any chance to also support something like :- bounds(L,U),0 < L,not counter(1,L). % fmt: skip
% which would be a shorthand for
% fmt: off
:- bounds(L,U),0 < L,not counter(1,L).
% fmt: on |
e2cccc4
to
cc87639
Compare
The comment `% fmt: off` will turn formatting off and `% fmt: on` turns it on again. ``` % fmt: off This section will not be formatted % fmt: on ```
This should be working now as you expect. The unformated code at the end of the file is now written. |
I do currently no parsing of the comment, I have a global variable skip: bool that is set to true if a comment contains What behavior would you expect for |
I guess so. I'm not sure what the semantic would be for a multi line statement should it consider the statement (rule) or the line? like in
Would the rule stay the same or just the line ?
|
Sry for the delayed answer. I was quite busy.
I'm not sure if this case has to be adressed or if it should just print out a warning or something like that. Regarding 'skip', i would expect that just the line stays the same. |
The comment
% fmt: off
will turn formatting offand
% fmt: on
turns it on again.