Skip to content

Commit

Permalink
lint + more explanation
Browse files Browse the repository at this point in the history
  • Loading branch information
balopat committed Sep 20, 2019
1 parent 97e70de commit 1dae8c2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions hack/versions/pkg/schema/comment.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,12 @@ import (
const releasedComment = `// !!! WARNING !!! This config version is already released, please DO NOT MODIFY the structs in this file.`
const unreleasedComment = `// This config version is not yet released, it is SAFE TO MODIFY the structs in this file.`

// historicalVersionComments is used to recognize that this comment is a release comment
// if you want to change a comment historically on all files, add the current version here and then change the
// text of releasedComment and unreleasedComment, and then run `go run hack/versions/cmd/update_comments/main.go`
// historicalVersionComments is used to recognize whether an existing comment is a "release comment" or not.
// If you want to change a (say releasedComment) comment historically on all files, then:
// 1.) add the current version to `historicalVersionComments`
// 2.) change the text of releasedComment (or unreleasedComment)
// 3.) run `go run hack/versions/cmd/update_comments/main.go`
// 4.) remove the updated version from `historicalVersionComments`
var historicalVersionComments = []string{
releasedComment,
unreleasedComment,
Expand Down

0 comments on commit 1dae8c2

Please sign in to comment.