Skip to content

Commit

Permalink
Changed auto gen message to include 'DO NOT EDIT.' to not cause lint …
Browse files Browse the repository at this point in the history
…errors vektra#183
  • Loading branch information
whiteheadrj committed Mar 9, 2018
1 parent 5af2e9d commit 57f4c1a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mockery/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ func (g *Generator) GeneratePrologue(pkg string) {
// GeneratePrologueNote adds a note after the prologue to the output
// string.
func (g *Generator) GeneratePrologueNote(note string) {
g.printf("// Code generated by mockery v%s\n", SemVer)
g.printf("// Code generated by mockery v%s. DO NOT EDIT.\n", SemVer)
if note != "" {
g.printf("\n")
for _, n := range strings.Split(note, "\\n") {
Expand Down
2 changes: 1 addition & 1 deletion mockery/generator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ func (s *GeneratorSuite) TestGeneratorPrologueNote() {
generator := s.getGenerator(testFile, "Requester", false)
generator.GeneratePrologueNote("A\\nB")

expected := `// Code generated by mockery v1.0.0
expected := `// Code generated by mockery v1.0.0. DO NOT EDIT.
// A
// B
Expand Down

0 comments on commit 57f4c1a

Please sign in to comment.