e26e5070

Created Started Cancelled

Ask for a field per line in a record value

A new module rule, `HsRecordFieldPerLine`.

## Why

Changing one field of a record written on one line rewrites that line, so the
diff says the whole value changed and review has to read it to find out what
did. Adding a field reflows whatever followed it. A field per line makes each of
those a one-line diff.

A value with one field has nothing to line up against and no second field to
push around, so it is left alone.

## What it reads

The fact is the offending value rather than every record value. What it records
is the line each field starts on, not the expression's own span: a field whose
value runs onto a second line makes the expression multi-line while every field
still has a line of its own, and that is not what the rule is about. The `..` of
a wildcard stands where a field would, so it takes up a line the same way.

Both `RecordCon` and `RecordUpd` are read, and both update forms. Record
patterns are not record values and are left alone.

## The two commits

1. The rule: the check, the registry entry, the good and bad resources.
2. This repository written to keep it. The flake runs hopinion on hopinion, so
   a rule that ships is one this repository keeps. Layout only, 19 files.

`nix flake check` passes.
PR #11