janestreet / janestreet/patdiff

Add an option to set the desired length for long lines

Open
#20 3 comments 0 reactions 0 assignees View on GitHub
forwarded-to-js-devs
Dominant language
OCaml
Stars
252
Forks
21
PR merge metrics
No merged PRs in 30d

Description

Currently, unless you set `split_long_lines:false` when using `Patdiff.Patdiff_core.patdiff` the line will split based on what is considered as the console length that is computed here

https://github.com/janestreet/patdiff/blob/836c423277c7c27f121e73f79b11737771040c8f/kernel/src/patdiff_core.ml#L419-L424

Couldn't this be the default value but customisable by adding an option `?max_line_length`?

Contributor guide

Open the contributing guide

Research direction

Start with kernel/src/patdiff_core.ml at the linked lines 419-424 and inspect the Patdiff.Patdiff_core.patdiff interface. Confirm how the current console length is computed and make the requested maximum line length configurable while preserving the existing behavior by default.

Written by the indexing model from the issue text.

Assessment

Tech stack
ocaml
Domain
tooling
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.