diff options
author | Hans Rosenfeld <hans.rosenfeld@nexenta.com> | 2016-08-31 16:46:25 +0200 |
---|---|---|
committer | Hans Rosenfeld <hans.rosenfeld@nexenta.com> | 2016-09-01 17:31:35 +0200 |
commit | c667d216889ea8258f2adb49c28cb0ef47990e5a (patch) | |
tree | 549d64bc70632403f2040a2d81b499f4533d3763 | |
parent | ae9727953cac4bd427aafd9f27458e401590bcb5 (diff) | |
download | illumos-joyent-c667d216889ea8258f2adb49c28cb0ef47990e5a.tar.gz |
7348 cstyle can't handle ellipsis on continuation line
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Jason King <jason.brian.king@gmail.com>
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Approved by: Dan McDonald <danmcd@omniti.com>
-rw-r--r-- | usr/src/tools/scripts/cstyle.pl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr/src/tools/scripts/cstyle.pl b/usr/src/tools/scripts/cstyle.pl index 874235ef21..e5f8c0aca5 100644 --- a/usr/src/tools/scripts/cstyle.pl +++ b/usr/src/tools/scripts/cstyle.pl @@ -20,6 +20,7 @@ # CDDL HEADER END # # Copyright 2015 Toomas Soome <tsoome@me.com> +# Copyright 2016 Nexenta Systems, Inc. # # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. @@ -400,7 +401,7 @@ line: while (<$filehandle>) { $prev = $line; next line; } - if ($in_function_header && ! /^ \w/ ) { + if ($in_function_header && ! /^ (\w|\.)/ ) { if (/^{}$/) { $in_function_header = 0; $function_header_full_indent = 0; @@ -497,7 +498,7 @@ line: while (<$filehandle>) { err("spaces instead of tabs"); } if (/^ / && !/^ \*[ \t\/]/ && !/^ \*$/ && - (!/^ \w/ || $in_function != 0)) { + (!/^ (\w|\.)/ || $in_function != 0)) { err("indent by spaces instead of tabs"); } if (/^\t+ [^ \t\*]/ || /^\t+ \S/ || /^\t+ \S/) { |