Should plugin names/folders be in camelCase or even lowercase? What about the class name? I see editor is called EditorPlugin for example.
New plugin folders & slugs should be lowercase, but I do not believe we will be changing existing ones at this time.
What about factory functions that return objects like Gdn::UserModel()?
Methods & functions will all move to camelCase.
Should new permissions be in camelCase?
No, permissions and config settings will keep StegosaurusCase (as do class names).
Should new tables/columns be in camelCase?
No, the database is an all-or-nothing proposition and we're not prepared to alter its structure at this time. It remains StegoCase, to our eternal chagrin.
If a variable holds an object
Doesn't matter what it holds; all new variables get camelCase moving forward.
I do believe this document is an accurate reflection of the new standards, which we put together a year ago: http://docs.vanillaforums.com/developers/contributing/coding-standard/ The dev team had a presentation last week to refresh everyone on the new standard since we're pushing it now.
@Linc said:
No, the database is an all-or-nothing proposition and we're not prepared to alter its structure at this time. It remains StegoCase, to our eternal chagrin.
No chagrin. "StegoCase" is ok to read, unlike camelCase (it's one of my pet peeves about Java[Script]). I've never seen a database using camelCase, and I hope that I will never do.
Comments
We are! Todd used PhpStorm.
Spacening has landed! Pull yer repos.
Crashing on its heels is the redocumentification: https://github.com/vanilla/vanilla/pull/2788
grep is your friend.
Exciting times!
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
Lord Brackos have mercy. Now it's the Casening & Brackos' Revenge: https://github.com/vanilla/vanilla/pull/2792
Would someone to see if your ruleset.xml and Sniffs work with the latest version of CodeSniffer like 2014 not 2012?
They don't. The latest version it works with is 1.5.6.
That explain it because I try Vanilla rules with the latest version and it does nothing.
We only became aware of the issue this past week. Hopefully an intrepid developer will sort it out soon.
A few questions regarding the new naming standards:
discussionController_render_before
orDiscussionController_render_before
since it contains a class name?editor
is calledEditorPlugin
for example.My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations
VanillaSkins.com - Plugins, Themes and Graphics for Vanillaforums OS
My coding standard always has been "whatever pressing Ctrl+Alt+L in PhpStorm does".
I can't really care more than that.
In addition to that:
If a variable holds an object, should it be in
StudlyCaps
?My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations
VanillaSkins.com - Plugins, Themes and Graphics for Vanillaforums OS
I try to adhere to standards, but already your questions make my head ache...
There is no perfect standard it is about constituency. I hope once settled on a standard they stick to it.
grep is your friend.
discussionController_render_before
is correct.New plugin folders & slugs should be lowercase, but I do not believe we will be changing existing ones at this time.
Methods & functions will all move to camelCase.
No, permissions and config settings will keep StegosaurusCase (as do class names).
No, the database is an all-or-nothing proposition and we're not prepared to alter its structure at this time. It remains StegoCase, to our eternal chagrin.
Doesn't matter what it holds; all new variables get camelCase moving forward.
I do believe this document is an accurate reflection of the new standards, which we put together a year ago: http://docs.vanillaforums.com/developers/contributing/coding-standard/ The dev team had a presentation last week to refresh everyone on the new standard since we're pushing it now.
Today I figured out how to make CodeSniffer autocorrect all our braces & bool/null casing.
https://www.youtube.com/watch?v=9E506brpCBw
Branch
the-stagening
holds 3 giant PRs combined for testing that we didn't break anything during this process.No chagrin. "StegoCase" is ok to read, unlike camelCase (it's one of my pet peeves about Java[Script]). I've never seen a database using camelCase, and I hope that I will never do.
My shop | About Me