Skip to content

Commit

Permalink
drop 'ignore' option for literal-string-quote config option
Browse files Browse the repository at this point in the history
  • Loading branch information
trentm committed Feb 9, 2012
1 parent bb0aa81 commit 319c43d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,8 @@ configurability.
This is legacy. Does anyone use this?
indent=<NUM|tab> An integer number of spaces for indentation, or
'tab' for tab indentation (the default).
literal-string-quote 'single' (the default), 'double' or 'ignore'.
Specifies the preferred quote character for
literal strings.
literal-string-quote 'single' (the default) or 'double'. Specifies
the preferred quote character for literal strings.
unparenthesized-return Boolean option, set to 0 to disable the
"unparenthesized return expression" check.
blank-after-start-comment
Expand Down
6 changes: 3 additions & 3 deletions jsstyle
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ my %config = (
doxygen => 0, # doxygen comments: /** ... */
splint => 0, # splint comments. Needed?
"unparenthesized-return" => 1,
"literal-string-quote" => "single", # 'single', 'double' or 'ignore'
"literal-string-quote" => "single", # 'single' or 'double'
"blank-after-start-comment" => 1,
);
sub add_config_var ($$) {
Expand Down Expand Up @@ -133,7 +133,7 @@ sub add_config_var ($$) {
die "$scope: invalid '$name': don't give a value";
}
} elsif ($name eq "literal-string-quote") {
if ($value !~ /single|double|ignore/) {
if ($value !~ /single|double/) {
die "$scope: invalid '$name': must be 'single' ".
"or 'double'";
}
Expand Down Expand Up @@ -508,7 +508,7 @@ line: while (<$filehandle>) {
!(/$lint_re/ || ($config{"splint"} && /$splint_re/))) {
err("missing blank before close comment");
}
if ($config{"blank-after-start-comment"} && /\/\/\S/) { # C++ comments
if ($config{"blank-after-start-comment"} && /(?<!\w:)\/\/\S/) { # C++ comments
err("missing blank after start comment");
}
# check for unterminated single line comments, but allow them when
Expand Down

0 comments on commit 319c43d

Please sign in to comment.