Subject: CVS commit: pkgsrc/devel/regal
From: Leonardo Taccari
Date: 2023-09-06 11:42:55
Message id: 20230906094255.A567FFBDB@cvs.NetBSD.org

Log Message:
regal: Update to 0.8.0

Changes:
v0.8.0
------
This is the most feature-packed release to date, adding a new output
format, four new rules, and many improvements across the board!

## New GitHub output format

The `regal lint` command now accepts a new `--format` option named
`github`. This is ideal for when Regal is run in CI/CD scenarios using
GitHub Actions. This format will emit annotations for any violation,
which will be visible in the pull request file view.

In addition to this, the GitHub output format will also create a linter
report visible in the "Checks" tab:

This report summarizes the result of linting, with links provided to
the documentation for any violation.

## New rule: use-some-for-output-vars

Using `some` to declare output variables used in iteration (and
elsewhere) has long been considered a best practice. Regal can now
identify places where variables are introduced without `some` and treat
these as errors.

## New rule: prefer-some-in-iteration

Similarly, the new `prefer-some-in-iteration` rule will have Regal warn
when using the "old" style of iteration which could be replaced in
favor of `some ... in`.

## New rule: metasyntactic-variable

Using rule and variable names like "foo", "bar" or \ 
"baz" might be
convenient in examples, but rarely has a place in production policy.
The new `metasyntactic-variable` rule will flag any occurences of these
names. The `ignore` directive may of course be used to e.g. allow these
type of variables in tests or other legitimate locations.

## New rule: file-length

Having policy files span several hundred lines of code is often a
signal to consider refactoring the code into smaller units, and to
modularize properly using packages and imports. The new `file-length`
rule by default flags any file with more than 500 lines. This number
can be changed via the rule's configuration.

v0.7.0
------
This release adds a new `custom` category to the built-in rules, which
allows users to easily define the most common organizational
requirements, like naming conventions, by simply editing their Regal
configuration.

## New custom category, and `naming-convention` rule

The custom category of rules allows teams and organizations to define
their own conventions for their Rego projects, without having to write
custom linter policies. Naming conventions are likely the most common
requirement, which is also what the new naming-convention rule helps
solve by allowing users to specify their conventions in the Regal
configuration using regex patterns.

Files:
RevisionActionfile
1.3modifypkgsrc/devel/regal/Makefile
1.2modifypkgsrc/devel/regal/distinfo
1.2modifypkgsrc/devel/regal/go-modules.mk