contrib/checkpatch: discourage g_assert*()

(cherry picked from commit 5ff19ea8d2)
This commit is contained in:
Lubomir Rintel 2019-06-25 10:46:26 +02:00 committed by Thomas Haller
parent 5dd1c6db65
commit 744c821bbd

View file

@ -193,6 +193,7 @@ complain ("Don't use space inside elvis operator ?:") if $line =~ /\?[\t ]+:/;
complain ("Don't add Emacs editor formatting hints to source files") if $line_no == 1 and $line =~ /-\*-.+-\*-/;
complain ("XXX marker are reserved for development while work-in-progress. Use TODO or FIXME comment instead?") if $line =~ /\bXXX\b/;
complain ("This gtk-doc annotation looks wrong") if $line =~ /\*.*\( *(transfer-(none|container|full)|allow none) *\) *(:|\()/;
complain ("Prefer nm_assert() or g_return*() to g_assert*()") if $line =~ /g_assert/ and not $filename =~ /\/tests\//;
new_hunk if $_ eq '';
my ($this_indent) = /^(\s*)/;