On Wed, Feb 03, 2021 at 09:49:50AM +0000, Linkcheck wrote: > /trap this|/ > /|trap this/ > /trap||this/ > > Is there a Lint tool that can check for this or be adapted easily? Or > perhaps a different method?
You can stage the PCRE tables from intended source tables to target tables via "make" rules, which in addition to deploying the source files into the right location first check that the source files pass basic sanity checks. The sanity checks can just run "postmap -q" with given inputs and ensure that the pattern either does or does not match as expected for that pattern. Makefile: foo.pcre: foo.pcre.in # Make sure this fails to match postmap -q example.com pcre:foo.pcre.in >/dev/null; exit [ $? -ne 0 ] # Make sure this matches postmap -q example.org pcre:foo.pcre.in >/dev/null # Install the map when the preconditions are met rsync foo.pcre.in foo.pcre You get to decide which assertions to test. -- Viktor.