diff --git a/.checkpatch.conf b/.checkpatch.conf index 01be7a909..b95dbe271 100644 --- a/.checkpatch.conf +++ b/.checkpatch.conf @@ -14,7 +14,6 @@ --ignore ENOSYS --ignore FILE_PATH_CHANGES --ignore GERRIT_CHANGE_ID ---ignore LINE_SPACING --ignore LOGICAL_CONTINUATIONS --ignore MACRO_WITH_FLOW_CONTROL --ignore PARENTHESIS_ALIGNMENT diff --git a/doc/manual/style.txt b/doc/manual/style.txt index fa08f4de9..e8a375cdd 100644 --- a/doc/manual/style.txt +++ b/doc/manual/style.txt @@ -45,7 +45,7 @@ OpenOCD project. - use TAB characters for indentation; do NOT use spaces. - displayed TAB width is 4 characters. - use Unix line endings ('\\n'); do NOT use DOS endings ('\\r\\n') -- limit adjacent empty lines to at most two (2). +- do NOT use multiple empty lines. - remove any trailing empty lines at the end of source files - do not "comment out" code from the tree nor put it within a block @code diff --git a/tools/scripts/checkpatch.pl b/tools/scripts/checkpatch.pl index 1011b3305..89f0a2178 100755 --- a/tools/scripts/checkpatch.pl +++ b/tools/scripts/checkpatch.pl @@ -4040,6 +4040,7 @@ sub process { } } +if (!$OpenOCD) { # check for missing blank lines after struct/union declarations # with exceptions for various attributes and macros if ($prevline =~ /^[\+ ]};?\s*$/ && @@ -4059,6 +4060,7 @@ sub process { fix_insert_line($fixlinenr, "\+"); } } +} # !$OpenOCD # check for multiple consecutive blank lines if ($prevline =~ /^[\+ ]\s*$/ && @@ -4073,6 +4075,7 @@ sub process { $last_blank_line = $linenr; } +if (!$OpenOCD) { # check for missing blank lines after declarations # (declarations must have the same indentation and not be at the start of line) if (($prevline =~ /\+(\s+)\S/) && $sline =~ /^\+$1\S/) { @@ -4118,6 +4121,7 @@ sub process { } } } +} # !$OpenOCD # check for spaces at the beginning of a line. # Exceptions: