On 08/01/2023 23:07, Victor Engmark via GNU coreutils General Discussion wrote:
Hi,
I'd like to enforce the POSIX portable file name character set in my
projects, which `pathchk -p` does, but I don't want to enforce the
POSIX maximum path component length of 14 characters, which it also
does. Would it be useful to introduce separate flags for the three
rules enforced by `-p`? One to enforce non-empty file names, one to
enforce the POSIX portable file name character set, and one to enforce
the POSIX maximum path component length.
This is a fair suggestion as the path component length is
generally too restrictive these days.
For example the coreutils sources don't comply with
the POSIX 14 char limit.
I suppose we could have --posix=all,naming,length
with -p equivalent to --posix=all
For my reference I wrote a similar util a long time ago
to split the checks over 4 levels of sensitivity,
when length and character patterns varying for each level:
https://github.com/pixelb/fslint/blob/master/fslint/findnl
cheers,
Pádraig