Skip to content

cmd/gofmt: refuses to format file with invalid column in line directive #38697

@josharian

Description

@josharian
package p

//line :7:0
var x int
$ gofmt x.go     
x.go:3:11: invalid column number: 0

I don't see why an invalid line directive should prevent gofmt from formatting the file. It doesn't change its behavior based on its contents.

Low priority.

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions