Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create new DiagnosticGroup for SUSPICIOUS_BREAKING_OUT_OF_OPTIONAL_CHAIN #4222

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions debian/closure-compiler.1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ require as a parameter a `WARNCLASS` warning class name. The following
names are valid warning class names:

* ``accessControls``
* ``breakingOptionalChain``
* ``checkRegExp``
* ``checkTypes``
* ``checkVars``
Expand Down
5 changes: 5 additions & 0 deletions src/com/google/javascript/jscomp/DiagnosticGroups.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ public static DiagnosticGroup forName(String name) {
// to parsing/ParserConfig.properties
static final String DIAGNOSTIC_GROUP_NAMES =
"accessControls, "
+ "breakingOptionalChain, "
+ "checkPrototypalTypes, "
+ "checkRegExp, "
+ "checkTypes, "
Expand Down Expand Up @@ -500,6 +501,10 @@ public static DiagnosticGroup forName(String name) {
ProcessCommonJSModules.SUSPICIOUS_EXPORTS_ASSIGNMENT,
TypeCheck.DETERMINISTIC_TEST);

public static final DiagnosticGroup BREAKING_OPTIONAL_CHAIN =
DiagnosticGroups.registerGroup(
"breakingOptionalChain", CheckSuspiciousCode.SUSPICIOUS_BREAKING_OUT_OF_OPTIONAL_CHAIN);

public static final DiagnosticGroup FUNCTION_PARAMS =
DiagnosticGroups.registerGroup(
"functionParams",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ jsdoc.annotations =\
# This should be a subset of the list of DiagnosticGroups.
jsdoc.suppressions =\
accessControls,\
breakingOptionalChain,\
checkDebuggerStatement,\
checkEs5InheritanceCorrectnessConditions,\
checkPrototypalTypes,\
Expand Down