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
Refactor handling of comments #2371
Commits on May 31, 2023
-
WIP: Factorize interpretation of comments
Define and centralize how comments are interpreted. The new function is also used by normalization, which had inconsistent rules before.
Configuration menu - View commit details
-
Copy full SHA for 7df9213 - Browse repository at this point
Copy the full SHA 7df9213View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9caf607 - Browse repository at this point
Copy the full SHA 9caf607View commit details -
Configuration menu - View commit details
-
Copy full SHA for 207f471 - Browse repository at this point
Copy the full SHA 207f471View commit details -
WIP: Rewrite parsing of normal and asterisk prefixed comments
A few regressions
Configuration menu - View commit details
-
Copy full SHA for 86ff2e4 - Browse repository at this point
Copy the full SHA 86ff2e4View commit details -
Configuration menu - View commit details
-
Copy full SHA for f5cce1a - Browse repository at this point
Copy the full SHA f5cce1aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 032f6c3 - Browse repository at this point
Copy the full SHA 032f6c3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 124a89b - Browse repository at this point
Copy the full SHA 124a89bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2d0930d - Browse repository at this point
Copy the full SHA 2d0930dView commit details -
Strip heading/trailing empty lines
This fixes two instances of unstable formatting but might be a regression when `wrap-comments=false`.
Configuration menu - View commit details
-
Copy full SHA for b207454 - Browse repository at this point
Copy the full SHA b207454View commit details -
Configuration menu - View commit details
-
Copy full SHA for e8875b5 - Browse repository at this point
Copy the full SHA e8875b5View commit details -
Configuration menu - View commit details
-
Copy full SHA for c42280a - Browse repository at this point
Copy the full SHA c42280aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4e4ef13 - Browse repository at this point
Copy the full SHA 4e4ef13View commit details -
Revert "Normalize comments in code in comments"
This reverts commit 70e5752b06fdef97e3c729d3bbfed14888ece62a.
Configuration menu - View commit details
-
Copy full SHA for 7e9e6ab - Browse repository at this point
Copy the full SHA 7e9e6abView commit details
Commits on Jun 1, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 6061527 - Browse repository at this point
Copy the full SHA 6061527View commit details -
The indentation of doc comments is significative for verbatim blocks. The decision of parsing a regular comment as doc must be done before decoding a comment. Regressions are due to test cases previously crashing finally being run.
Configuration menu - View commit details
-
Copy full SHA for 520a35c - Browse repository at this point
Copy the full SHA 520a35cView commit details -
Revert "Test 'error4' requires one more iteration"
This reverts commit f5cce1a. No longer the case.
Configuration menu - View commit details
-
Copy full SHA for 2095965 - Browse repository at this point
Copy the full SHA 2095965View commit details -
Configuration menu - View commit details
-
Copy full SHA for 606447a - Browse repository at this point
Copy the full SHA 606447aView commit details
Commits on Jun 2, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 4572014 - Browse repository at this point
Copy the full SHA 4572014View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3468395 - Browse repository at this point
Copy the full SHA 3468395View commit details -
Configuration menu - View commit details
-
Copy full SHA for aa80541 - Browse repository at this point
Copy the full SHA aa80541View commit details
Commits on Jun 5, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 364fc75 - Browse repository at this point
Copy the full SHA 364fc75View commit details -
Configuration menu - View commit details
-
Copy full SHA for e009001 - Browse repository at this point
Copy the full SHA e009001View commit details -
Restore break before preceeding multi-line comments
This break was removed in previous commits
Configuration menu - View commit details
-
Copy full SHA for 7bff959 - Browse repository at this point
Copy the full SHA 7bff959View commit details -
Configuration menu - View commit details
-
Copy full SHA for f8719ba - Browse repository at this point
Copy the full SHA f8719baView commit details
Commits on Jun 6, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 69f2a8e - Browse repository at this point
Copy the full SHA 69f2a8eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5a56bf1 - Browse repository at this point
Copy the full SHA 5a56bf1View commit details -
Fix parsing and printing of header-like comments
Allow indented lines with no asterisks and trailing newline in asterisk prefixed comments. A trailing newline results in the star of the closing token to be aligned with the asterisks.
Configuration menu - View commit details
-
Copy full SHA for 37bf3f0 - Browse repository at this point
Copy the full SHA 37bf3f0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8bf52f2 - Browse repository at this point
Copy the full SHA 8bf52f2View commit details -
Configuration menu - View commit details
-
Copy full SHA for cf878da - Browse repository at this point
Copy the full SHA cf878daView commit details -
Configuration menu - View commit details
-
Copy full SHA for 00a77f3 - Browse repository at this point
Copy the full SHA 00a77f3View commit details
Commits on Jun 7, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 6e0ae10 - Browse repository at this point
Copy the full SHA 6e0ae10View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9a5bb99 - Browse repository at this point
Copy the full SHA 9a5bb99View commit details -
Merge pull request #1 from gpetiot/cmts-factor-dont-check-margin
Don't check the margin to group comments
Configuration menu - View commit details
-
Copy full SHA for fe93ffd - Browse repository at this point
Copy the full SHA fe93ffdView commit details -
Even less open parsing of asterisk prefixed
This could interfere with a comment like: (*with exn -> failwiths "binary_search bug" (exn, `length length, `search_key search_key, `pos pos, `len len) <:sexp_of< exn * [ `length of int ] * [ `search_key of int ] * [ `pos of int ] * [ `len of int ] >>*)
Configuration menu - View commit details
-
Copy full SHA for 58e8d0b - Browse repository at this point
Copy the full SHA 58e8d0bView commit details -
Change the baseline indentation for unwrapped comments
Preserve comments like: (* foo *)
Configuration menu - View commit details
-
Copy full SHA for f4f64ca - Browse repository at this point
Copy the full SHA f4f64caView commit details -
Configuration menu - View commit details
-
Copy full SHA for 017935d - Browse repository at this point
Copy the full SHA 017935dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1ee288d - Browse repository at this point
Copy the full SHA 1ee288dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 09a9638 - Browse repository at this point
Copy the full SHA 09a9638View commit details -
Configuration menu - View commit details
-
Copy full SHA for b92c62f - Browse repository at this point
Copy the full SHA b92c62fView commit details -
Don't mix comments and docstrings
Comments and docstrings no longer have to be differentiated before formatting. Concatenating "*" to docstrings is no longer necessary. Some comments starting with `(**` were in fact not docstrings.
Configuration menu - View commit details
-
Copy full SHA for 25aa14c - Browse repository at this point
Copy the full SHA 25aa14cView commit details
Commits on Jun 8, 2023
-
Configuration menu - View commit details
-
Copy full SHA for cd00fe6 - Browse repository at this point
Copy the full SHA cd00fe6View commit details -
Don't mix comments and docstrings
Comments and docstrings no longer have to be differentiated before formatting. Concatenating "*" to docstrings is no longer necessary. Some comments starting with `(**` were in fact not docstrings. What is a docstring is now dictated by the lexer, which removes this kind of bug.
Configuration menu - View commit details
-
Copy full SHA for ef208e9 - Browse repository at this point
Copy the full SHA ef208e9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2ef7270 - Browse repository at this point
Copy the full SHA 2ef7270View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7633f3e - Browse repository at this point
Copy the full SHA 7633f3eView commit details
Commits on Jun 9, 2023
-
Configuration menu - View commit details
-
Copy full SHA for c37b6ad - Browse repository at this point
Copy the full SHA c37b6adView commit details
Commits on Jun 12, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 8a4e1cf - Browse repository at this point
Copy the full SHA 8a4e1cfView commit details -
Configuration menu - View commit details
-
Copy full SHA for e000e31 - Browse repository at this point
Copy the full SHA e000e31View commit details
Commits on Jun 22, 2023
-
Configuration menu - View commit details
-
Copy full SHA for e273379 - Browse repository at this point
Copy the full SHA e273379View commit details
Commits on Jun 23, 2023
-
Configuration menu - View commit details
-
Copy full SHA for ca35745 - Browse repository at this point
Copy the full SHA ca35745View commit details -
Configuration menu - View commit details
-
Copy full SHA for 27a0074 - Browse repository at this point
Copy the full SHA 27a0074View commit details
Commits on Sep 19, 2023
-
Configuration menu - View commit details
-
Copy full SHA for fcf2b80 - Browse repository at this point
Copy the full SHA fcf2b80View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0c95f7e - Browse repository at this point
Copy the full SHA 0c95f7eView commit details
Commits on Oct 26, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 418f8c3 - Browse repository at this point
Copy the full SHA 418f8c3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8f3d799 - Browse repository at this point
Copy the full SHA 8f3d799View commit details
Commits on Nov 2, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 971df85 - Browse repository at this point
Copy the full SHA 971df85View commit details -
Configuration menu - View commit details
-
Copy full SHA for bce8df8 - Browse repository at this point
Copy the full SHA bce8df8View commit details
Commits on Nov 6, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 20f4fb8 - Browse repository at this point
Copy the full SHA 20f4fb8View commit details -
Configuration menu - View commit details
-
Copy full SHA for c86b00c - Browse repository at this point
Copy the full SHA c86b00cView commit details -
Remove the forced line break before a multi-line comment. The asymmetry of this forced line break allowed comments to be move back and forth between being attached to after `f` or before `a`. This adds regressions.
Configuration menu - View commit details
-
Copy full SHA for 907d70a - Browse repository at this point
Copy the full SHA 907d70aView commit details
Commits on Nov 7, 2023
-
Configuration menu - View commit details
-
Copy full SHA for a400535 - Browse repository at this point
Copy the full SHA a400535View commit details -
Configuration menu - View commit details
-
Copy full SHA for a0c9aae - Browse repository at this point
Copy the full SHA a0c9aaeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5f5532e - Browse repository at this point
Copy the full SHA 5f5532eView commit details -
test: Fix spacing in cinaps.ml
Consecutive comments with no empty line in between are not formatted.
Configuration menu - View commit details
-
Copy full SHA for 86e12c3 - Browse repository at this point
Copy the full SHA 86e12c3View commit details