diff --git a/godot.go b/godot.go index 81211d7..35e368c 100644 --- a/godot.go +++ b/godot.go @@ -49,8 +49,8 @@ var ( // Special tags in comments like "// nolint:", or "// +k8s:". tags = regexp.MustCompile(`^\+?[a-z0-9]+:`) - // Special hashtags in comments like "#nosec". - hashtags = regexp.MustCompile("^#[a-z]+ ") + // Special hashtags in comments like "// #nosec". + hashtags = regexp.MustCompile(`^#[a-z]+($|\s)`) // URL at the end of the line. endURL = regexp.MustCompile(`[a-z]+://[^\s]+$`)