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

SWEEP: Make private/internal fields readonly where possible, #661 #1103

Merged
merged 1 commit into from
Jan 19, 2025

Conversation

paulirwin
Copy link
Contributor

  • You've read the Contributor Guide and Code of Conduct.
  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • There's an open issue for the PR that you are making. If you'd like to propose a change, please open an issue to discuss the change or find an existing issue.

Makes private/internal fields readonly where possible.

Fixes #661

Description

This PR used ReSharper/Rider's analyzer to find fields that could be made readonly. This PR does not affect any static fields (that's #1079) or protected fields (which might be modified by subclasses). In a few cases, instance fields were made const or static readonly where possible.

@paulirwin paulirwin added the notes:improvement An enhancement to an existing feature label Jan 19, 2025
Copy link
Contributor

@NightOwl888 NightOwl888 left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. This looks good to merge.

@paulirwin paulirwin merged commit 728d555 into apache:master Jan 19, 2025
267 checks passed
@paulirwin paulirwin deleted the issue/661 branch January 19, 2025 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notes:improvement An enhancement to an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Review for IDE0044: Add readonly modifier to private fields
2 participants