diff --git a/core/analyzer.go b/core/analyzer.go index 8661732..83e3631 100644 --- a/core/analyzer.go +++ b/core/analyzer.go @@ -183,11 +183,11 @@ func (gas *Analyzer) ProcessSource(filename string, source string) error { return err } -// ignore a node (and sub-tree) if it is tagged with a "nosec" comment +// ignore a node (and sub-tree) if it is tagged with a "#nosec" comment func (gas *Analyzer) ignore(n ast.Node) bool { if groups, ok := gas.context.Comments[n]; ok && !gas.ignoreNosec { for _, group := range groups { - if strings.Contains(group.Text(), "nosec") { + if strings.Contains(group.Text(), "#nosec") { gas.Stats.NumNosec++ return true }