Skip to content

Commit a1c2260

Browse files
committed
chore: Remove line numbers from auto-gen typescript
The line numbers are just extra noise that change when things shift around. They are not required and usually make CI fail when you forget to run 'make gen'.
1 parent 36ffdce commit a1c2260

File tree

2 files changed

+78
-81
lines changed

2 files changed

+78
-81
lines changed

scripts/apitypings/main.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,10 +249,7 @@ func (g *Generator) generateAll() (*TypescriptTypes, error) {
249249
func (g *Generator) posLine(obj types.Object) string {
250250
file := g.pkg.Fset.File(obj.Pos())
251251
position := file.Position(obj.Pos())
252-
position.Filename = filepath.Join("codersdk", filepath.Base(position.Filename))
253-
return fmt.Sprintf("// From %s\n",
254-
position.String(),
255-
)
252+
return fmt.Sprintf("// From %s\n", filepath.Join("codersdk", filepath.Base(position.Filename)))
256253
}
257254

258255
// buildStruct just prints the typescript def for a type.

0 commit comments

Comments
 (0)