-
Notifications
You must be signed in to change notification settings - Fork 52
Description
Describe the issue
I'm writing a rule similar to https://github.com/mindersec/minder-rules-and-profiles/pull/228/files#diff-c403aa914bf9da4592bdc7034803e737cabb0713223d0c07ddb4a8ba99004936
When i run mindev ruletype lint -r [my.yaml] on a file I get the following errors:
aggregates: {}
metrics: {}
aggregateprofile: {}
ignoredirectives: {}
violations:
- title: opa-fmt
description: File should be formatted with `opa fmt`
category: style
level: error
relatedresources:
- description: documentation
reference: https://docs.styra.com/regal/rules/style/opa-fmt
location:
end: null
text: package minder
file: gitleaks_github_action.yaml
column: 1
row: 1
offset: 0
isaggregate: false
- title: directory-package-mismatch
description: Directory structure should mirror package
category: idiomatic
level: error
relatedresources:
- description: documentation
reference: https://docs.styra.com/regal/rules/idiomatic/directory-package-mismatch
location:
end:
row: 1
column: 15
text: package minder
file: gitleaks_github_action.yaml
column: 9
row: 1
offset: 0
isaggregate: false
notices:
- title: implicit-future-keywords
description: Rule made obsolete by rego.v1 capability
category: imports
level: notice
severity: none
profile: []
summary:
filesscanned: 1
filesfailed: 1
rulesskipped: 0
numviolations: 2
The file was located in the github rules folder: https://github.com/mindersec/minder-rules-and-profiles/tree/main/rule-types/github so it looks like it was expecting the package to be "github". I also couldn't get rid of the "File should be formatted with opa fmt" error unless I ran mindev ruletype lint -r [my.yaml] --skip-rego
Should the linter work out of the. box for these scenarios?
To Reproduce
Run on mindev ruletype lint -r on https://github.com/mindersec/minder-rules-and-profiles/pull/228/files#diff-c403aa914bf9da4592bdc7034803e737cabb0713223d0c07ddb4a8ba99004936
What version are you using?
No response