Skip to content

cmd: Format source on -w #22

Description

@abhinav

By default, cmd/errtrace tries not to shift lines between input/output.
The intent here is to be able to use this and get, say, coverage numbers out of your code without line numbers being off.

But with -w, the intent is that you transform your code and check it in.
That code should be well-formatted Go code.

The command should reformat code by default, but probably support opting out.

Activity

  1. abhinav commented on Nov 22, 2023

    @abhinav
    ContributorAuthor

    Thinking a -format={always,never,auto} situation with auto being the default.
    Better than a boolean yes/no, allowing us to pick a "on with -w, off without"

  2. added a commit that references this issue on Nov 22, 2023
    12705b8
  3. added a commit that references this issue on Nov 22, 2023
    e1c997f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions