Summary: Max file length exceeded
Excessively large policy files.
Splitting large policy files into smaller ones.
Putting too much logic into a single file makes your policy harder to browse, read and maintain. Splitting logic into several smaller files, and composing policy by proper use of packages and imports, highlights dependencies and makes it easier to reason about.
Note that even a single package may be split up across several files! This is sometimes useful when different features or functions belong in the same "group", but are not directly related to each other. An example of this could be having a single package for configuration split across different files for different parts or functions of that configuration.
As an added bonus, some tools — like Regal! — may even benefit from avoiding huge files as they process files in parallel and thus will be able to handle many smaller files faster than a few large ones.
This linter rule provides the following configuration options:
# one of "error", "warning", "ignore"
# default limit is 500 lines
If you think you've found a problem with this rule or its documentation, would like to suggest improvements, new rules,
or just talk about Regal in general, please join us in the
#regal channel in the Styra Community