summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-10-17 14:07:56 +0200
committerThomas Haller <thaller@redhat.com>2018-10-18 12:16:55 +0200
commit8221f824f3797499c9504e2f2b237a9ead4540da (patch)
tree17be7fa0b608cc544e318dccfa4f7ff3ac4f17a6
parent2af1dc1d287334dcd02d8282fcfdbe3a8e031363 (diff)
downloadNetworkManager-8221f824f3797499c9504e2f2b237a9ead4540da.tar.gz
checkpatch: complain about Emacs file variables in source code
-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 d6b3c4451a..0769273bcb 100755
--- a/contrib/scripts/checkpatch.pl
+++ b/contrib/scripts/checkpatch.pl
@@ -132,6 +132,7 @@ complain ("Don't use \"$1 $2\" instead of \"$2 $1\"") if $line =~ /\b(char|short
complain ("Don't use \"unsigned int\" but just use \"unsigned\"") if $line =~ /\b(unsigned) +(int)\b/;
complain ("Please use LGPL2+ for new files") if $is_patch and $line =~ /under the terms of the GNU General Public License/;
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 =~ /-\*-.+-\*-/;
new_hunk if $_ eq '';
my ($this_indent) = /^(\s*)/;