Skip to content

Commit c309a8c

Browse files
lauraharkercopybara-github
authored andcommitted
Make the error on string continuations a linter-only check
PiperOrigin-RevId: 611469524
1 parent 763e063 commit c309a8c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/com/google/javascript/jscomp/DiagnosticGroups.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,8 @@ public static DiagnosticGroup forName(String name) {
604604
ClosureCheckModule.INCORRECT_SHORTNAME_CAPITALIZATION,
605605
ClosureRewriteModule.USELESS_USE_STRICT_DIRECTIVE,
606606
RhinoErrorReporter.JSDOC_MISSING_BRACES_WARNING,
607-
RhinoErrorReporter.UNNECESSARY_ESCAPE));
607+
RhinoErrorReporter.UNNECESSARY_ESCAPE,
608+
RhinoErrorReporter.STRING_CONTINUATION));
608609

609610
public static final DiagnosticGroup STRICT_MODULE_CHECKS =
610611
DiagnosticGroups.registerGroup(

src/com/google/javascript/jscomp/RhinoErrorReporter.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,9 @@ class RhinoErrorReporter {
101101
"JSC_INVALID_OCTAL_LITERAL",
102102
"This style of octal literal is not supported in strict mode.");
103103

104+
// This check should only be enabled in the lintChecks DiagnosticGroup as part of the linter
104105
static final DiagnosticType STRING_CONTINUATION =
105-
DiagnosticType.warning("JSC_STRING_CONTINUATION", "{0}");
106+
DiagnosticType.disabled("JSC_STRING_CONTINUATION", "{0}");
106107

107108
static final DiagnosticType LANGUAGE_FEATURE =
108109
DiagnosticType.error("JSC_LANGUAGE_FEATURE", "{0}.");

0 commit comments

Comments
 (0)