Skip to content

Commit

Permalink
Update rule/rule.go
Browse files Browse the repository at this point in the history
Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im>
  • Loading branch information
stevebarrau and fmeum committed Mar 8, 2023
1 parent b75524d commit 1abfd61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rule/rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -996,7 +996,7 @@ func (r *Rule) sync() {
func ShouldKeep(e bzl.Expr) bool {
for _, c := range append(e.Comment().Before, e.Comment().Suffix...) {
text := strings.TrimSpace(strings.TrimPrefix(c.Token, "#"))
if strings.HasPrefix(text, "keep") {
if text == "keep" || strings.HasPrefix(text, "keep: ") {
return true
}
}
Expand Down

0 comments on commit 1abfd61

Please sign in to comment.