Open montanaflynn opened 4 years ago
The comment should have DO NOT EDIT. and an extra blank line following. That will indicate to linters that the file is auto generated and will exclude it from linting.
See https://golang.org/s/generatedcode
EXAMPLE
// Code generated by broccoli at 2020-04-20T23:26:30+07:00. DO NOT EDIT.
package swot
import "aletheia.icu/broccoli/fs"
var br = fs.New("...")
Ahh TIL, that sounds good!
Changing the comment to:
// Code generated by broccoli at 2020-04-20T23:26:30+07:00. DO NOT EDIT.
Even without an extra blank line removed the warning and signaled it was a generated file.
Because the current comment is put at the top it causes
golint
to complain:I suggest moving it to above the variable: