From 744c821bbd3540564f1928f74511e5068fb81089 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Tue, 25 Jun 2019 10:46:26 +0200 Subject: [PATCH] contrib/checkpatch: discourage g_assert*() (cherry picked from commit 5ff19ea8d24e6b3751c4356727664ea51f879010) --- contrib/scripts/checkpatch.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/scripts/checkpatch.pl b/contrib/scripts/checkpatch.pl index 016ec8bf64..65996eca7f 100755 --- a/contrib/scripts/checkpatch.pl +++ b/contrib/scripts/checkpatch.pl @@ -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*)/;