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

Authoring: Diagnostic for private getter #651

Merged
merged 3 commits into from
Jan 6, 2021

Conversation

j0shuams
Copy link
Contributor

@j0shuams j0shuams commented Jan 5, 2021

There was a diagnostic missed for private getters, I am adding a positive and negative test case for private setter and private getter on properties (respectively). My change is to look at the method accessibility on all property symbols, via the CheckProperties function -- which is the new name of CheckPropertySignature.

The function CheckPropertySignature used in checking classe and interfaces, and this check really only needs to happen for classes. Originally, I thought to take the loop out of the helper function and leave it in the class loop of FindDiagnostics. But felt like looping over properties twice wasn't essential. Open to feedback on whether to do this check for interfaces or not.

@j0shuams j0shuams force-pushed the jlarkin/privategetterdiagnostic branch from 80828e9 to f67cb4a Compare January 5, 2021 05:17
@j0shuams j0shuams linked an issue Jan 5, 2021 that may be closed by this pull request
@j0shuams j0shuams merged commit 21e070e into master Jan 6, 2021
@j0shuams j0shuams deleted the jlarkin/privategetterdiagnostic branch January 6, 2021 23:55
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.

Block setter-only properties (winrt diagnostics)
3 participants