mirror of
https://github.com/curl/curl.git
synced 2026-05-30 06:57:28 +03:00
style: use space after comment start and before comment end
/* like this */ /*not this*/ checksrc is updated accordingly Closes #9828
This commit is contained in:
parent
b8c302dcba
commit
52cc4a85fd
42 changed files with 152 additions and 147 deletions
|
|
@ -91,6 +91,9 @@ my %warnings = (
|
|||
'EMPTYLINEBRACE' => 'Empty line before the open brace',
|
||||
'EQUALSNULL' => 'if/while comparison with == NULL',
|
||||
'NOTEQUALSZERO', => 'if/while comparison with != 0',
|
||||
'INCLUDEDUP', => 'same file is included again',
|
||||
'COMMENTNOSPACESTART' => 'no space following /*',
|
||||
'COMMENTNOSPACEEND' => 'no space before */',
|
||||
);
|
||||
|
||||
sub readskiplist {
|
||||
|
|
@ -424,6 +427,18 @@ sub scanfile {
|
|||
$line, length($1), $file, $l, "Trailing whitespace");
|
||||
}
|
||||
|
||||
# no space after comment start
|
||||
if($l =~ /^(.*)\/\*\w/) {
|
||||
checkwarn("COMMENTNOSPACESTART",
|
||||
$line, length($1) + 2, $file, $l,
|
||||
"Missing space after comment start");
|
||||
}
|
||||
# no space at comment end
|
||||
if($l =~ /^(.*)\w\*\//) {
|
||||
checkwarn("COMMENTNOSPACEEND",
|
||||
$line, length($1) + 1, $file, $l,
|
||||
"Missing space end comment end");
|
||||
}
|
||||
# ------------------------------------------------------------
|
||||
# Above this marker, the checks were done on lines *including*
|
||||
# comments
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue