-
Notifications
You must be signed in to change notification settings - Fork 182
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
Better ignore doc comment #2456
Conversation
I'm not sure we should ignore docstrings while checking. They are part of the AST and loosing or moving one would be catastrophic. Perhaps the normalization function could be improved instead ? What's your use case for |
The purpose of Here is what the ocamlformat doc says
The flag was introduced for debug/dev purposes so that one case focus on |
Doc comments are part of the AST and I don't consider them problematic like comments. I think doc comments issues are of higher priority than other |
Please looks at what's done currently. Please look at the documentation for this option. This option is not supposed to be used by regular users. It currently already ignores some doc-comments. This PR just make the behavior consistent. I don't really understand your pushback on this developers option. This change allows to run ocamlformat on files triggering warning 50 and spot |
Also see PR introducing the feature #259 |
This PR is restoring the feature introduced in #259 that was altered at some point later |
The regression was introduced by #1672
|
Alright, you convinced me it's useful, let's merge. |
Fix #2408
Floating doc comment were not ignored when using
--no-comment-check
, only attached doc-comment were.This change can result in empty
Ptop_def []
which are now ignored while mapping.For the record, I've tested this PR on the all sources inside opam-respository
I don't see any
Ast changed
bug anymore