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

🐛 Turn on the amphtml-internal/unused-private-field rule, fix errors #22626

Merged
merged 1 commit into from
Jun 18, 2019
Merged

🐛 Turn on the amphtml-internal/unused-private-field rule, fix errors #22626

merged 1 commit into from
Jun 18, 2019

Conversation

rsimha
Copy link
Contributor

@rsimha rsimha commented May 31, 2019

#15075 added a new lint rule called amphtml-internal/unused-private-field to ensure that all private class fields are correctly annotated. Since then, the rule has sat around for a while in warning mode and then gotten turned off.

This PR re-enables the rule and updates annotations that aren't supposed to be @private.

Note: Most of the annotations I've changed are obviously supposed to be @protected, @restricted, or @visibleForTesting. However, a small handful of fields are either not being used anywhere, or are being exposed to external code in some way. In the interest of not touching code, I've gone ahead and marked them @protected. (/cc @jridgewell)

Fixes #14742

@rsimha rsimha requested a review from jridgewell May 31, 2019 21:01
@rsimha rsimha self-assigned this May 31, 2019
@ampproject ampproject deleted a comment from codecov bot May 31, 2019
@ampproject ampproject deleted a comment from codecov bot May 31, 2019
@ampproject ampproject deleted a comment from codecov bot May 31, 2019
@ampproject ampproject deleted a comment from codecov bot Jun 1, 2019
@ampproject ampproject deleted a comment from codecov bot Jun 1, 2019
@ampproject ampproject deleted a comment from codecov bot Jun 1, 2019
@ampproject ampproject deleted a comment from codecov bot Jun 1, 2019
@rsimha rsimha requested a review from erwinmombay June 2, 2019 19:10
@rsimha
Copy link
Contributor Author

rsimha commented Jun 3, 2019

Codecov spam was due to a bad configuration in .codecov.yml. Fixed in 986f9cd.

@rsimha rsimha merged commit 686dbb5 into ampproject:master Jun 18, 2019
@rsimha rsimha deleted the 2019-05-31-UnusedPrivateField branch June 18, 2019 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Find unused (dead) class fields
3 participants