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

Style Guideline for Reserved Keywords #404

Closed
PlagueHO opened this Issue Jun 8, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@PlagueHO
Contributor

PlagueHO commented Jun 8, 2018

I've just noticed that I've been enforcing the use of all lower case for keywords like param, if, foreach, for, switch, try, catch, return etc in my code reviews, but have just realized there is no actual style guideline (except for the param block - which is also tested for in DSCResource.Tests).

What is the general feeling on this? Should there be a guideline or should I stop worrying about it (😁)? It's pretty minor in the scheme of things, but if we did want to make it a guideline it would save me a lot of review time if I could add some automated tests for it.

@ld0614

This comment has been minimized.

Show comment
Hide comment
@ld0614

ld0614 Jun 8, 2018

Contributor

Personally I think that if, foreach, switch etc should be lowercase, Param I just defaulted to uppercase as I think it fits better with the Parameter attribute. Having tests either way would definitely help keep code aligned and covered without manual and potential inconsistent code reviews

Contributor

ld0614 commented Jun 8, 2018

Personally I think that if, foreach, switch etc should be lowercase, Param I just defaulted to uppercase as I think it fits better with the Parameter attribute. Having tests either way would definitely help keep code aligned and covered without manual and potential inconsistent code reviews

@johlju

This comment has been minimized.

Show comment
Hide comment
@johlju

johlju Jun 9, 2018

Contributor

I also always enforced lower-case on those too 😄 Probably because both style guideline and best practices are written like that. I like to see tests for these, since I think most code is written like this. Also a test for the space after the keyword (which is in the guideline today).

Contributor

johlju commented Jun 9, 2018

I also always enforced lower-case on those too 😄 Probably because both style guideline and best practices are written like that. I like to see tests for these, since I think most code is written like this. Also a test for the space after the keyword (which is in the guideline today).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment