Generic arguments mess up the alignment of comments in groups

Open
#63 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
haskell
Domain
tooling

Research direction

Start by reproducing the issue with the CDDL transaction_body example in the report and inspect the formatter or alignment entry point responsible for grouped fields and comments. Done means formatting fields with and without generic arguments produces consistently aligned comments, including the shown generic-argument cases.

Written by the indexing model from the issue text.

Description

transaction_body = 
  {   0  : set<transaction_input>          ; inputs
  ,   1  : [* transaction_output]
  ,   2  : coin                              ; fee
  , ? 3  : uint                              ; time to live
  , ? 4  : certificates
  , ? 5  : withdrawals
  , ? 7  : auxiliary_data_hash
  , ? 8  : uint                              ; validity interval start
  , ? 9  : mint
  , ? 11 : script_data_hash
  , ? 13 : nonempty_set<transaction_input> ; collateral inputs
  , ? 14 : required_signers
  , ? 15 : network_id
  , ? 16 : transaction_output                ; collateral return
  , ? 17 : coin                              ; total collateral
  , ? 18 : nonempty_set<transaction_input> ; reference inputs
  , ? 19 : voting_procedures                 ; New; Voting procedures
  , ? 20 : proposal_procedures               ; New; Proposal procedures
  , ? 21 : coin                              ; New; current treasury value
  , ? 22 : positive_coin                     ; New; donation
  }

I actually think it's all of the other fields that get the comments wrong, because the ones with genericargs seem to have the right amount of spaces, but every other field has two extra spaces for some reason.

Dominant language
Haskell
Stars
8
Forks
5
Avg merge
3d 12h
Merged PRs (30d)
4

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from IntersectMBO/cuddle

All issues in IntersectMBO/cuddle

Similar issues

More Haskell issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.