You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be neat if it was possible to point Regal at Markdown files and have it lint any code blocks with rego set as the language identifier. This should probably be opt-in when Regal is pointed at a directory, but regal lint doc.md should just work.
We'll need to consider that example Rego in markdown files are often just snippets, so we can't assume things like a package declaration. This should be similar to rq in that regard, so we can probably borrow some logic from that project.
Similarly, we'll want to disable any aggregate rules in this context, as those don't make any sense when dealing with snippets.
Later, we might want to allow different configuration options for this, as opa fmt formatting and tabs in particular sadly doesn't look great in most markdown docs (displayed as 8 spaces). But that can be dealt with in follow-up issues.
The text was updated successfully, but these errors were encountered:
Thanks! Yeah, and it'd be a good way to ensure we're not unintentionally breaking our own rules in our own docs. Not sure how we'd best handle linting the "Avoid" blocks, but that's a problem for later 😄
It would be neat if it was possible to point Regal at Markdown files and have it lint any code blocks with
rego
set as the language identifier. This should probably be opt-in when Regal is pointed at a directory, butregal lint doc.md
should just work.We'll need to consider that example Rego in markdown files are often just snippets, so we can't assume things like a package declaration. This should be similar to rq in that regard, so we can probably borrow some logic from that project.
Similarly, we'll want to disable any aggregate rules in this context, as those don't make any sense when dealing with snippets.
Later, we might want to allow different configuration options for this, as
opa fmt
formatting and tabs in particular sadly doesn't look great in most markdown docs (displayed as 8 spaces). But that can be dealt with in follow-up issues.The text was updated successfully, but these errors were encountered: