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

Enable and apply CA1822: Mark members as static #302

Merged
merged 11 commits into from
Apr 24, 2024

Conversation

PaulusParssinen
Copy link
Contributor

@PaulusParssinen PaulusParssinen commented Apr 22, 2024

This PR enables CA1822: Mark members as static analyzer from the Performance-category. The rule was applied using the VS automation.

Static calls are cheaper.

Copy link
Contributor

@TedHartMS TedHartMS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tsavorite changes look good, with one comment

@badrishc
Copy link
Contributor

For StorageSession, it has become rather confusing now with the API being a mix of static and non-static methods. It would be nice for the storage API to be discoverable via the instance storageSession instead of being split between static and non-static. Particularly as we might want to expose this API to users in future.

@PaulusParssinen
Copy link
Contributor Author

PaulusParssinen commented Apr 22, 2024

For StorageSession, it has become rather confusing now with the API being a mix of static and non-static methods. It would be nice for the storage API to be discoverable via the instance storageSession instead of being split between static and non-static. Particularly as we might want to expose this API to users in future.

I'll try revert those files where the automation made things more confusing 👍

* Static and non-static APIs made things confusing
@TalZaccai TalZaccai requested a review from badrishc April 23, 2024 18:41
Copy link
Contributor

@badrishc badrishc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM; please resolve the conflicts.

@badrishc badrishc merged commit cce3053 into microsoft:main Apr 24, 2024
30 checks passed
@PaulusParssinen PaulusParssinen deleted the enable-ca1822 branch April 24, 2024 00:43
@github-actions github-actions bot locked and limited conversation to collaborators Jun 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants