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

Set Styles and Conventions #37

Open
FuzzicalLogic opened this issue May 21, 2019 · 3 comments
Open

Set Styles and Conventions #37

FuzzicalLogic opened this issue May 21, 2019 · 3 comments

Comments

@FuzzicalLogic
Copy link
Contributor

This is going to be a long-term issue until we feel most of the baselines are covered in terms of Tokens and Patterns. This issue is made specifically to provide a forum for questions and discussion of the conventions and style used within PoE-Bot.

As of PR #34, there will be the beginnings of STYLE_GUIDE.md for contributors to our project to follow. To enable conformance, .editorconfig will help with editor behaviors specific to PoE-Bot and issue notices and warnings for failure to conform.

As such, each STYLE_GUIDE addition that requires any form or character or format conformance, will have a relevant change to .editorconfig.

@FuzzicalLogic
Copy link
Contributor Author

Per PR #33, parameters/arguments should be camelCase.

I prefer constants and enum properties that have constant type values to be in CAPITAL_CASE. Do you agree, @Kyle-Undefined?

@Kyle-Undefined
Copy link
Owner

Kyle-Undefined commented May 21, 2019

@FuzzicalLogic I don't like capital case as it grabs too much attention. I prefer Pascal Case for enums. Don't really have a preference for constants. If you want to have those to be capital case, that's fine.

@FuzzicalLogic
Copy link
Contributor Author

I've also started adding events to the code. The standard for event handlers in .Net used to be OnEventName for single events, and OnBeforeEventName, OnAfterEventName for paired responses. As far as I can tell, that is still the case in many projects and it suits me over EventNameHandler.

So, I recommend in cases where the event handler is a class method, we stick to the OnEventName convention. But, in cases, where we might be passing Handlers around as parameters and return values, we use EventNameHandler. Does that suit you?

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

No branches or pull requests

2 participants