Skip to content

"Generated by" comments appear above boilerplate #1095

@skitt

Description

@skitt

Description

Mockery’s "generated by" comments now appear above boilerplate; this is a change compared to v2. Many projects expect their boilerplate to be at the top of generated files.

Reproducer

Take a v2 project, update it to v3, notice that

// Code generated by mockery; DO NOT EDIT.
// github.com/vektra/mockery
// template: testify

appears above the boilerplate.

Expected behavior

This is a matter of taste, but in the interest of preserving existing v2 behaviour the boilerplate should come first.

Mockery version

v3.5.1

Installation Mechanism

  • go get
  • [] Pre-built release
  • [] homebrew
  • [] Other: [please describe]

Go version

Version of Go used to build mockery from source (if applicable).
1.24.5

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