reasonml / reasonml/reason

Comment above the line influences line width calculation

Open
#2,318 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Printer
Dominant language
OCaml
Stars
10.3k
Forks
438
PR merge metrics
No merged PRs in 30d

Description

Before:

        /* do nothing here as target path is going to be checked at some point
         */
        return((prevpath, prevmtime));

After:

        /* do nothing here as target path is going to be checked at some point
         */
        return((
          prevpath,
          prevmtime,
        ));

Tested with 3.3.7.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named. Start by reproducing the formatting difference from the issue's before-and-after snippets with Reason 3.3.7, then trace the formatter's line-width calculation around comments above expressions. Done means the comment no longer causes the tuple return to be unnecessarily expanded.

Written by the indexing model from the issue text.

Assessment

Tech stack
ocaml
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.