mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: Remove line numbers from auto-gen typescript (#3258)
* 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'.
This commit is contained in:
@@ -248,11 +248,7 @@ func (g *Generator) generateAll() (*TypescriptTypes, error) {
|
||||
|
||||
func (g *Generator) posLine(obj types.Object) string {
|
||||
file := g.pkg.Fset.File(obj.Pos())
|
||||
position := file.Position(obj.Pos())
|
||||
position.Filename = filepath.Join("codersdk", filepath.Base(position.Filename))
|
||||
return fmt.Sprintf("// From %s\n",
|
||||
position.String(),
|
||||
)
|
||||
return fmt.Sprintf("// From %s\n", filepath.Join("codersdk", filepath.Base(file.Name())))
|
||||
}
|
||||
|
||||
// buildStruct just prints the typescript def for a type.
|
||||
|
||||
Reference in New Issue
Block a user