Skip to content

Commit

Permalink
removed comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Hidanio committed Jul 10, 2024
1 parent 92745d5 commit 80b61c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
9 changes: 2 additions & 7 deletions src/rules/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,17 +231,12 @@ func (p *parser) parseRuleInfo(st ir.Node, labelStmt ir.Node, proto *Rule) (Rule
if len(part.Params) != 1 {
return rule, p.errorf(st, "@path expects exactly 1 param, got %d", len(part.Params))
}
/* if rule.Path != "" {
return rule, p.errorf(st, "duplicate @path constraint")
}*/

if rule.Path == nil {
rule.Path = make([]string, 0)
}

for _, path := range part.Params {
rule.Path = append(rule.Path, path)
}
//rule.Path = append(rule.Path)
rule.Path = append(rule.Path, part.Params...)
case "path-exclude":
if len(part.Params) != 1 {
return rule, p.errorf(st, "@exclude expects exactly 1 param, got %d", len(part.Params))
Expand Down
1 change: 0 additions & 1 deletion src/rules/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ func formatRule(r *Rule) string {
for _, path := range r.Path {
buf.WriteString(" * @path " + path + "\n")
}
// buf.WriteString(" * @path " + r.Path + "\n")
}

if r.PathExcludes != nil {
Expand Down

0 comments on commit 80b61c5

Please sign in to comment.