mirror of
https://github.com/fzipp/gocyclo.git
synced 2025-02-06 11:01:57 +00:00
Allow ignore directive with trailing spaces
This commit is contained in:
parent
d554ab6362
commit
28ccd9b63a
@ -32,7 +32,7 @@ func parseDirectives(doc *ast.CommentGroup) directives {
|
||||
var ds directives
|
||||
for _, comment := range doc.List {
|
||||
if strings.HasPrefix(comment.Text, prefix) {
|
||||
ds = append(ds, strings.TrimPrefix(comment.Text, prefix))
|
||||
ds = append(ds, strings.TrimSpace(strings.TrimPrefix(comment.Text, prefix)))
|
||||
}
|
||||
}
|
||||
return ds
|
||||
|
Loading…
x
Reference in New Issue
Block a user