audit: correct inverted has_trailing_newline condition

has_trailing_newline? checked if formula did not have a trailing
newline. Invert regex and invert audit check.

Closes #18359.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>