On Mon, Feb 19, 2024 at 10:11 AM Collin Funk <collin.fu...@gmail.com> wrote:
> Jim Meyering <j...@meyering.net> writes:
> > Thank you both. I've just pushed an improvement.
> > The new version runs grep only once rather than many times, and seems 
> > simpler.
>
> Thanks. This one seems much better. It also returns 1 if an invalid
> quoted header is found which I forgot to do. This Makefile would
> probably be good view for me. :)
>
> I feel like this rule might cause some false positives for some projects
> in a few rare cases. Files in the namespace std*.h and sys/*.h probably
> shouldn't be used (not sure if they are explicitly reserved). However,
> it might be possible that a project uses it's own "error.h" or
> "search.h", for example, unrelated to gnulib.
>
> Would it make sense to add an exclude regexp to cfg.mk or make a note
> about reserved header names in the documentation?

Sure, for a rare false-positive match in a file named bar.c, add a
line like this in cfg.mk:

  exclude_file_name_regexp--sc_prefer_angle_bracket_headers = ^bar\.c$$

If there's some systemic/frequent false positive, we should consider
adjusting maint.mk.

Reply via email to