Skip to content

Commit

Permalink
Use plural form
Browse files Browse the repository at this point in the history
Signed-off-by: Shiqi Yang <[email protected]>
  • Loading branch information
sqyang94 committed Nov 4, 2024
1 parent 7b6b251 commit 5cd286b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ast/compile.go
Original file line number Diff line number Diff line change
Expand Up @@ -384,10 +384,10 @@ func (c *Compiler) WithPathConflictsCheck(fn func([]string) (bool, error)) *Comp
return c
}

// WithPathConflictsCheckRoot enables checking path conflicts from the specified root instead
// WithPathConflictsCheckRoots enables checking path conflicts from the specified root instead
// of the top root node. This would enable optimizting path conflict checks during bundle
// activation if a bundle already defines its own root paths.
func (c *Compiler) WithPathConflictsCheckRoot(rootPaths []string) *Compiler {
func (c *Compiler) WithPathConflictsCheckRoots(rootPaths []string) *Compiler {
c.pathConflictCheckRoots = rootPaths
return c
}
Expand Down
2 changes: 1 addition & 1 deletion ast/compile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1966,7 +1966,7 @@ p { true }`,
return false, fmt.Errorf("unexpected error")
}
return false, nil
}).WithPathConflictsCheckRoot([]string{"badrules"})
}).WithPathConflictsCheckRoots([]string{"badrules"})

compileStages(c, c.checkRuleConflicts)

Expand Down
2 changes: 1 addition & 1 deletion plugins/bundle/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ func (p *Plugin) activate(ctx context.Context, name string, b *bundle.Bundle, is
WithEnablePrintStatements(p.manager.EnablePrintStatements())

if b.Manifest.Roots != nil {
compiler = compiler.WithPathConflictsCheckRoot(*b.Manifest.Roots)
compiler = compiler.WithPathConflictsCheckRoots(*b.Manifest.Roots)
}

var activateErr error
Expand Down

0 comments on commit 5cd286b

Please sign in to comment.