Skip to content
Browse files

drop 'ignore' option for literal-string-quote config option

  • Loading branch information...
1 parent bb0aa81 commit 319c43d4542357b6f33c4609cf1d3e7eef390d2f @trentm trentm committed Feb 9, 2012
Showing with 5 additions and 6 deletions.
  1. +2 −3 README.md
  2. +3 −3 jsstyle
View
5 README.md
@@ -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
View
6 jsstyle
@@ -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 ($$) {
@@ -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'";
}
@@ -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

0 comments on commit 319c43d

Please sign in to comment.
Something went wrong with that request. Please try again.