Skip to content

Commit b5e5929

Browse files
author
Denis Krivak
committed
Fix regexp for checking hashtags.
1 parent ac903ab commit b5e5929

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

godot.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ var (
4949
// Special tags in comments like "// nolint:", or "// +k8s:".
5050
tags = regexp.MustCompile(`^\+?[a-z0-9]+:`)
5151

52-
// Special hashtags in comments like "#nosec".
53-
hashtags = regexp.MustCompile("^#[a-z]+ ")
52+
// Special hashtags in comments like "// #nosec".
53+
hashtags = regexp.MustCompile(`^#[a-z]+($|\s)`)
5454

5555
// URL at the end of the line.
5656
endURL = regexp.MustCompile(`[a-z]+://[^\s]+$`)

0 commit comments

Comments
 (0)