Skip to content

Formatting with gofumpt #604

Closed
Closed

Description

@thanethomson

There have been discussions previously about potentially formatting (and enforcing formatting) with gofumpt (see tendermint/tendermint#9738, tendermint/tendermint#9208, tendermint/tendermint#8478).

The main argument against this was that doing a big-bang reformat of the whole codebase significantly hampers our ability to do code archeology, which, with a codebase like this, is incredibly important for our team to be able to make meaningful progress.

A compromise here would be to start to enforce this locally - i.e. on each of our own machines when saving our code, that only the files each of us touch in a specific PR get formatted with gofumpt. As we progressively refactor the system, I'm fairly confident we'll end up touching most of the codebase, simultaneously progressively formatting the code.

At some point, once the diff between formatting and not formatting the codebase with gofumpt drops below a certain level (say a few hundred LoC), we can simply format the remainder of the code in a single PR and implement a formatting enforcement check as part of CI (at which point we can close this issue).

Activity

  1. added
    hygiene
    on Mar 28, 2023
  2. added a commit that references this issue on Apr 5, 2023
  3. added a commit that references this issue on May 6, 2023
  4. added a commit that references this issue on Jan 16, 2024
    c2bd2e2
  5. added this to the 2024-Q1 milestone on Jan 17, 2024
  6. added a commit that references this issue on Jan 24, 2024
    e45176a
  7. added a commit that references this issue on Jan 25, 2024
    e9637ad
  8. moved this from Todo to Done in CometBFTon Jan 25, 2024
  9. added a commit that references this issue on Jan 25, 2024
    de9206d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

hygiene

Type

No type

Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions