Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions go-generate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# go generate directives
#
# the comment must start at the beginning of the line and have no spaces between the // and the go:generate
rules:
- id: go-generate-must-not-be-indented
message: any //go:generate comment must appear at the start of a line
severity: ERROR
languages: [go]
patterns:
- pattern-regex: ".//go:generate"
- id: go-generate-must-not-have-space-after-comment
message: the go:generate directive must have no spaces between the // and go:generate
severity: ERROR
languages: [go]
patterns:
- pattern-regex: "//\\s+go:generate"