Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix line break removal before package directive #111

Closed
wants to merge 1 commit into from
Closed

Fix line break removal before package directive #111

wants to merge 1 commit into from

Conversation

matthewhughes934
Copy link

@matthewhughes934 matthewhughes934 commented Oct 15, 2023

Due to an upstream bug[1] if golines were to reformat (i.e. it actually found a line that was too long) a file with a block comment before the package directive, the newline before the package directive would be stripped, e.g.

/*
this is a comment
*/
package foo

Would become

/*
this is a comment
*/ package foo

The underlying issue has been fixed upstream, so fix here by bumping the version of github.com/dave/dst to include that fix. Here's a summary of the changes in that package from the previously used version:

$ git log --no-merges --format='%h %s' v0.27.0..v0.27.3
5fa8d6e Fixes #69
bc71a76 Upgrade golang.org/x/tools to v0.1.12
b6f3447 decorator: make an error more verbose

[1] dave/dst#69

Due to an upstream bug[1] if `golines` were to reformat (i.e. it
actually found a line that was too long) a file with a block comment
before the package directive, the newline before the package directive
would be stripped, e.g.

    /*
    this is a comment
    */
    package foo

Would become

    /*
    this is a comment
    */ package foo

The underlying issue has been fixed upstream, so fix here by bumping the
version of `github.com/dave/dst` to include that fix. Here's a summary of
the changes in that package from the previously used version:

    $ git log --no-merges --format='%h %s' v0.27.0..v0.27.3
    5fa8d6e Fixes #69
    bc71a76 Upgrade golang.org/x/tools to v0.1.12
    b6f3447 decorator: make an error more verbose

[1] dave/dst#69
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant