summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2019-06-25 10:46:26 +0200
committerLubomir Rintel <lkundrak@v3.sk>2019-06-25 20:27:39 +0200
commit5ff19ea8d24e6b3751c4356727664ea51f879010 (patch)
tree75740b4ff7eecec02766b1ae818ca65428e20c86
parent16dbe0a573b9daf096dfe514401094358b36b9a1 (diff)
downloadNetworkManager-5ff19ea8d24e6b3751c4356727664ea51f879010.tar.gz
contrib/checkpatch: discourage g_assert*()
-rwxr-xr-xcontrib/scripts/checkpatch.pl1
1 files changed, 1 insertions, 0 deletions
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*)/;