David Malcolm <dmalc...@redhat.com> writes: > On Wed, 2025-03-26 at 19:59 +0100, Jakub Jelinek wrote: >> On Wed, Mar 26, 2025 at 02:34:43PM -0400, David Malcolm wrote: >> >> Thanks for working on this. >> My python is very limited, so just adding some comments rather >> than doing patch review. >> >> > +COMMON_MISSPELLINGS = {('dg_final', 'dg-final')} >> >> Does that catch just dg_final and not say dg_do or dg_error >> or dg-output_file ? > > Unfortunately only the ones I spelled out. > >> I'd think a common misspelling would be any replacement of - with >> _ (maybe also omitting the - altogether). > > Maybe a generalization of the regexp to dg[-_][-_a-z]+ or similar, and > then report things that match the "with underscores" regexp but not the > "without underscores" regexp.
I don't think we have any valid "user-facing" dg_ directives (there are some dg_ matches in .exp files though). May be worth having two tiers here, I guess: known mismatch and also just suspicious _ even when we can't figure out intent. But not that important? > > >> And I think Sam fixed >> some dg-compile or dg-run misspellings of dg-do compile or dg-do run. >> >> Does it have a list of valid dg-* directives and diagnose if it >> sees dg-invalid-directive? > > It doesn't; that's a good idea. Right, we can extend it for 'dg-do known-actions' as well. > > Dave