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

Combine const and static fields' naming rules #2168

Merged
merged 1 commit into from Aug 25, 2019

Conversation

@yahiheb
Copy link
Collaborator

commented Aug 25, 2019

No description provided.

@lontivero

This comment has been minimized.

Copy link
Collaborator

commented Aug 25, 2019

Explain this please.

@yahiheb

This comment has been minimized.

Copy link
Collaborator Author

commented Aug 25, 2019

The first rule say const fields should be PascalCase, the second rule says static fields should be also PascalCase. I combined the two rules in one rule that says const and static fields should be PascalCase.

@yahiheb

This comment has been minimized.

Copy link
Collaborator Author

commented Aug 25, 2019

But IMO the second rule should be for static readonly not static alone. (source)
If a field is readonly it should be named _pascalCase.
If you agree with this do not merge this PR and I will open a new PR to correct that.

@lontivero lontivero merged commit f0dbd68 into zkSNACKs:master Aug 25, 2019

4 checks passed

CodeFactor No issues found.
Details
Wasabi.Linux #20190825.1 succeeded
Details
Wasabi.Osx #20190825.1 succeeded
Details
Wasabi.Windows #20190825.1 succeeded
Details

@yahiheb yahiheb deleted the yahiheb:combine-naming-rule branch Aug 25, 2019

@yahiheb

This comment has been minimized.

Copy link
Collaborator Author

commented Aug 26, 2019

@lontivero What do you think about my comment?
I think that static fields or readonly fields should be _pascalCase but static readonly fields should be PascalCase.

@nopara73

This comment has been minimized.

Copy link
Collaborator

commented Aug 26, 2019

I think it's good as it is now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.