Skip to content

Commit

Permalink
Detect generated files using github.com/cheekybits/genny (daixiang0#132)
Browse files Browse the repository at this point in the history
Signed-off-by: Christophe de Carvalho <christophe.dcpm@gmail.com>
  • Loading branch information
zaibon authored Jan 3, 2023
1 parent 0a02b8b commit 33a14c3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/parse/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,11 @@ func IsGeneratedFileByComment(in string) bool {
const (
genCodeGenerated = "code generated"
genDoNotEdit = "do not edit"
genAutoFile = "autogenerated file" // easyjson
genAutoFile = "autogenerated file" // easyjson
genAutoGenerated = "automatically generated" // genny
)

markers := []string{genCodeGenerated, genDoNotEdit, genAutoFile}
markers := []string{genCodeGenerated, genDoNotEdit, genAutoFile, genAutoGenerated}
in = strings.ToLower(in)
for _, marker := range markers {
if strings.Contains(in, marker) {
Expand Down

0 comments on commit 33a14c3

Please sign in to comment.