#!/bin/bash # # We fail CI if the word "F I X M E" is detedcted, as a whole word, # in any case. The word is not matched if there are word-characters # abutted to it. # # We also fail with X X X (three or more), but we tolerate # AFTER X X X set -e set -o pipefail version_re=$(perl ; $d = from_toml($d) or die $!; my $version = $d->{package}{version} // die $!; $version =~ s/\W/\\$&/g; printf "%s\n", $version or die $!; '); rcs=' ' check1 () { set +e "$@" rcs+="$? " set -e } check1 git --no-pager grep -P -i '\bfixme\b' check1 git --no-pager grep -P '(?&2 'Found FIXMEs/XXXs - RC TODS - in the codebase!' exit 1 ;; *) echo >&2 'git grep failed!' exit 16 ;; esac