Skip to content

Check that generated code can be compiled #23

@brandur

Description

@brandur

I've run into a few instances where Schematic will generated something like this:

// Restart formation.
func (s *Service) FormationRestart(appIdentity int, formationIdentity string) (*Formation, error) {
    var formation Formation
    return &formation, s.Post(&formation, fmt.Sprintf("/apps/%v/formations/%v/actions/restart", appIdentity, formationIdentity), o)
}

(Which is Go code that cannot compile.)

It can usually be fixed by tweaking some parameters around in a schema, but it might be cool if Schematic performed some kind of sanity check after generating code.

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