Follow-up Comment #10, bug #62776 (project groff):
[comment #9 comment #9:] > comment #8 comment #8:] > > Disabling a warning if you don't care is easy. > > I would love for that to be true of groff warnings. Unfortunately, you can only enable and disable warnings by category, the existing categories range in scope from ridiculously narrow to overly broad, and there's not a scalable mechanism for adding more. Realistically this proposed warning will end up in the same category as others you might care about even if you intentionally use ' when not strictly necessary. It's actually true of warnings in any software (especially in software that produces a single line for each diagnostic). As I said recently in the mailing list, here's what I do with mandoc(1), which doesn't have any native mechanisms for disabling warnings: $(_LINT_man_mandoc): $(_MANDIR)/%.lint-man.mandoc.touch: $(MANDIR)/% | $$(@D)/ $(info LINT (mandoc) $@) ! ($(MANDOC) -man $(MANDOCFLAGS) $< 2>&1 \ | $(GREP) -v 'STYLE: lower case character in document title:' \ | $(GREP) -v 'UNSUPP: ignoring macro in table:' \ | $(GREP) -v 'WARNING: cannot parse date, using it verbatim: TH (date)' \ | $(GREP) -v 'WARNING: empty block: UR' \ | $(GREP) -v 'WARNING: missing date, using "": TH' \ | $(GREP) -v 'WARNING: undefined escape, printing literally: \\\\' \ ||:; \ ) \ | $(GREP) '.' >&2 touch $@ $(_LINT_mdoc_mandoc): $(_MANDIR)/%.lint-mdoc.mandoc.touch: $(MANDIR)/% | $$(@D)/ $(info LINT (mandoc) $@) ! ($(MANDOC) -mdoc $(MANDOCFLAGS) $< 2>&1 \ | $(GREP) -v 'STYLE: operating system explicitly specified: Os ' \ | $(GREP) -v 'WARNING: cross reference to self: Xr ' \ ||:; \ ) \ | $(GREP) '.' >&2 touch $@ grep(1) is your tool for disabling unwanted diagnostics. ;) _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?62776> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/