Skip to content

Check that generated code can be compiled #23

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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