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:
Mark Zhuang
2024-10-25 14:45:06 +08:00
committed by Antonio Borneo
parent cd41947feb
commit aa6a071086
3 changed files with 5 additions and 2 deletions

View File

@@ -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: