Home | History | Annotate | Download | only in sets
History log of /src/distrib/sets/fmt-list
RevisionDateAuthorComments
 1.6  08-Sep-2022  rillig distrib/sets/fmt-list: clean up string formatting

No functional change.
 1.5  15-Feb-2021  rillig distrib/sets/fmt-list: document how to sort by directory first

In lists/base/mi, the directory ./libdata/firmware contains several
subdirectories for which the entries do not look aligned right now, even
after normalizing the alignment.

This is because the indentation for a directory is not determined
globally for all directory entries from the complete file, but instead
for each group of items, after sorting, that have the same directory.
This results in several entries having only a single item per group,
such as ./libdata/firmware/nouveau, and this single item is obviously
consistently indented since all of its 1 lines are already indented to
the same depth.

One possible solution for this is to sort the entries in another order,
keeping all entries from a directory together. This allows to quickly
see all entries from a certain directory, but on the other hand, when
adding a new directory plus some entries, the directory has to be listed
far away from its entries. (This would be done automatically by
fmt-list though, which weakens this argument a bit.)

Another possible solution for this is to first determine the indentation
for all entries from each directory, no matter how far these entries are
apart, and then indent these entries to the common indentation. This
may or may not help since there will still be single entries between
groups of differently indented entries.

Writing down the intuitive rules for how to align the entries properly
is a nontrivial task. See pkglint/varalignblock, which is around 650
lines of code, plus around 4000 lines of test code.

No functional change.
 1.4  15-Feb-2021  rillig distrib/sets/list-fmt: sort commented entries like regular entries

Seen in lists/modules/ad.aarch64, among others. These lines are not
intended as comments but as regular entries that just happen to be
commented out.

This is the same as how pkglint treats commented variable assignments,
which take part in aligning blocks of variable assignments even though
they are syntactically comments.
 1.3  02-Nov-2020  rillig when formatting a file list, exit on errors

This is needed to regenerate distrib/sets/lists/tests/mi for adding
another test in usr.bin/make.
 1.2  08-Sep-2020  rillig distrib/sets/fmt-list: add no-action mode

This is useful for finding parse errors only. Inspired by some entries
that are obsolete and have more than the "obsolete" flag. There are
only few of these entries though, and they don't seem worth fixing.
 1.1  05-Sep-2020  rillig add distrib/sets/fmt-list to format the file lists consistently

This program is much more complicated than sort-list in the same
directory. It takes care of aligning the fields of the lines so that
lines from the same directory are aligned to each other. This reduces
horizontal jumps for the category and flags fields.

RSS XML Feed