It's irrelevant which tool does the checking. The problem is that you don't know whether "// go:generate foo", "//ho:generate bar" or "//go;generate baz" are errors or simply comments.
In order to detect most of that you'll have to redefine the comment syntax for the core language so it's no longer free-form but anything that looks like a comment-directive now triggers a warning (or most likely an error seeing the Go philosophy).
In order to detect most of that you'll have to redefine the comment syntax for the core language so it's no longer free-form but anything that looks like a comment-directive now triggers a warning (or most likely an error seeing the Go philosophy).