forked from auracaster/openocd
doc:style: do not use multiple empty lines
Enable LINE_SPACING but only check multiple blank lines now Change-Id: I332d4d414a04eec8fc54b49d416a954d30592219 Signed-off-by: Mark Zhuang <mark.zhuang@spacemit.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8365 Reviewed-by: zapb <dev@zapb.de> Reviewed-by: Jan Matyas <jan.matyas@codasip.com> Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
committed by
Antonio Borneo
parent
cd41947feb
commit
aa6a071086
@@ -14,7 +14,6 @@
|
|||||||
--ignore ENOSYS
|
--ignore ENOSYS
|
||||||
--ignore FILE_PATH_CHANGES
|
--ignore FILE_PATH_CHANGES
|
||||||
--ignore GERRIT_CHANGE_ID
|
--ignore GERRIT_CHANGE_ID
|
||||||
--ignore LINE_SPACING
|
|
||||||
--ignore LOGICAL_CONTINUATIONS
|
--ignore LOGICAL_CONTINUATIONS
|
||||||
--ignore MACRO_WITH_FLOW_CONTROL
|
--ignore MACRO_WITH_FLOW_CONTROL
|
||||||
--ignore PARENTHESIS_ALIGNMENT
|
--ignore PARENTHESIS_ALIGNMENT
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ OpenOCD project.
|
|||||||
- use TAB characters for indentation; do NOT use spaces.
|
- use TAB characters for indentation; do NOT use spaces.
|
||||||
- displayed TAB width is 4 characters.
|
- displayed TAB width is 4 characters.
|
||||||
- use Unix line endings ('\\n'); do NOT use DOS endings ('\\r\\n')
|
- 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
|
- 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
|
- do not "comment out" code from the tree nor put it within a block
|
||||||
@code
|
@code
|
||||||
|
|||||||
@@ -4040,6 +4040,7 @@ sub process {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!$OpenOCD) {
|
||||||
# check for missing blank lines after struct/union declarations
|
# check for missing blank lines after struct/union declarations
|
||||||
# with exceptions for various attributes and macros
|
# with exceptions for various attributes and macros
|
||||||
if ($prevline =~ /^[\+ ]};?\s*$/ &&
|
if ($prevline =~ /^[\+ ]};?\s*$/ &&
|
||||||
@@ -4059,6 +4060,7 @@ sub process {
|
|||||||
fix_insert_line($fixlinenr, "\+");
|
fix_insert_line($fixlinenr, "\+");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} # !$OpenOCD
|
||||||
|
|
||||||
# check for multiple consecutive blank lines
|
# check for multiple consecutive blank lines
|
||||||
if ($prevline =~ /^[\+ ]\s*$/ &&
|
if ($prevline =~ /^[\+ ]\s*$/ &&
|
||||||
@@ -4073,6 +4075,7 @@ sub process {
|
|||||||
$last_blank_line = $linenr;
|
$last_blank_line = $linenr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!$OpenOCD) {
|
||||||
# check for missing blank lines after declarations
|
# check for missing blank lines after declarations
|
||||||
# (declarations must have the same indentation and not be at the start of line)
|
# (declarations must have the same indentation and not be at the start of line)
|
||||||
if (($prevline =~ /\+(\s+)\S/) && $sline =~ /^\+$1\S/) {
|
if (($prevline =~ /\+(\s+)\S/) && $sline =~ /^\+$1\S/) {
|
||||||
@@ -4118,6 +4121,7 @@ sub process {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} # !$OpenOCD
|
||||||
|
|
||||||
# check for spaces at the beginning of a line.
|
# check for spaces at the beginning of a line.
|
||||||
# Exceptions:
|
# Exceptions:
|
||||||
|
|||||||
Reference in New Issue
Block a user