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 version
Version of Go used to build mockery from source (if applicable).
1.24.5
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
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.1Installation Mechanism
go getGo version
Version of Go used to build mockery from source (if applicable).
1.24.5