Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Input ¶
type Input struct { // FileContent carries the string contents of each file FileContent map[string]string // Modules is the set of modules to lint. Modules map[string]*ast.Module // FileNames is used to maintain consistent order between runs. FileNames []string }
Input represents the input for a linter evaluation.
func InputFromPaths ¶
InputFromPaths creates a new Input from a set of file or directory paths. Note that this function assumes that the paths point to valid Rego files. Use config.FilterIgnoredPaths to filter out unwanted content *before* calling this function.
func InputFromText ¶ added in v0.9.0
InputFromText creates a new Input from raw Rego text.
type OpaFmtRule ¶
type OpaFmtRule struct {
// contains filtered or unexported fields
}
func NewOpaFmtRule ¶
func NewOpaFmtRule(conf config.Config) *OpaFmtRule
func (*OpaFmtRule) Category ¶
func (*OpaFmtRule) Category() string
func (*OpaFmtRule) Config ¶
func (f *OpaFmtRule) Config() config.Rule
func (*OpaFmtRule) Description ¶
func (*OpaFmtRule) Description() string
func (*OpaFmtRule) Documentation ¶
func (*OpaFmtRule) Documentation() string
func (*OpaFmtRule) Name ¶
func (*OpaFmtRule) Name() string
type Rule ¶
type Rule interface { // Run runs the rule on the provided input. Run(context.Context, Input) (*report.Report, error) // Name returns the name of the rule. Name() string // Category returns the category of the rule. Category() string // Description returns the description of the rule. Description() string // Documentation returns the documentation URL for the rule. Documentation() string // Config returns the provided configuration for the rule Config() config.Rule }
Rule represents a linter rule.
func AllGoRules ¶
Click to show internal directories.
Click to hide internal directories.