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

Add SUSPICIOUS_BREAKING_OUT_OF_OPTIONAL_CHAIN to SUSPICIOUS_CODE DiagnosticGroup #4221

Conversation

jnowjack-lucidchart
Copy link
Contributor

Discussion on the Closure Compiler Discuss Group: https://groups.google.com/g/closure-compiler-discuss/c/ZpsidQkqdjk

Reasoning for change: We have set --jscomp_error suspiciousCode in our codebase and noticed that we were getting warnings instead of errors for SUSPICIOUS_BREAKING_OUT_OF_OPTIONAL_CHAIN. We would like this to be an error instead of a warning in line with the other DiagnosticTypes defined in CheckSuspiciousCode

@brad4d
Copy link
Contributor

brad4d commented Feb 21, 2025

It's worth trying to do this despite my comments on https://groups.google.com/g/closure-compiler-discuss/c/ZpsidQkqdjk

We do suppress "suspiciousCode" warnings in internal JS code that was generated from TS, so this may actually be OK.

@brad4d brad4d self-assigned this Feb 21, 2025
@brad4d
Copy link
Contributor

brad4d commented Feb 24, 2025

I've just imported this PR and sent it for internal testing.

@brad4d
Copy link
Contributor

brad4d commented Feb 26, 2025

Good news! The test results look good, so I think I'll be able to submit the internal change, which will end up closing this PR.

@copybara-service copybara-service bot merged commit 37bb677 into google:master Feb 26, 2025
5 checks passed
@jnowjack-lucidchart
Copy link
Contributor Author

Awesome, thanks Bradford!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants