Skip to content

Commit

Permalink
Fix regexp for checking hashtags.
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis Krivak committed Sep 17, 2020
1 parent ac903ab commit b5e5929
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions godot.go
Original file line number Diff line number Diff line change
Expand Up @@ -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]+$`)
Expand Down

0 comments on commit b5e5929

Please sign in to comment.