Beware the 4-spacening this week (25 May)

2

Comments

  • LincLinc Director of Development Detroit Vanilla Staff

    @hgtonight said:
    Are you using an IDE code formatting function to update the files?

    We are! Todd used PhpStorm.

  • LincLinc Director of Development Detroit Vanilla Staff

    Spacening has landed! Pull yer repos.

  • :lol: ;)

    grep is your friend.

  • hgtonighthgtonight ∞ · New Moderator

    Exciting times! :D

    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.

  • LincLinc Director of Development Detroit Vanilla Staff

    Lord Brackos have mercy. Now it's the Casening & Brackos' Revenge: https://github.com/vanilla/vanilla/pull/2792

    Bleistivt
  • chanhchanh OngETC.com - CMS Researcher ✭✭

    Would someone to see if your ruleset.xml and Sniffs work with the latest version of CodeSniffer like 2014 not 2012?

  • LincLinc Director of Development Detroit Vanilla Staff

    They don't. The latest version it works with is 1.5.6.

  • chanhchanh OngETC.com - CMS Researcher ✭✭

    That explain it because I try Vanilla rules with the latest version and it does nothing.

  • LincLinc Director of Development Detroit Vanilla Staff

    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:

    • How should Hooks be called? discussionController_render_before or DiscussionController_render_before since it contains a class name?
    • Should plugin names/folders be in camelCase or even lowercase? What about the class name? I see editor is called EditorPlugin for example.
    • What about factory functions that return objects like Gdn::UserModel()?
    • Should new permissions be in camelCase?
    • Should new tables/columns be in camelCase?

    My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations

    • Vanilla APP » Learn more «
    • iOS & Android App for Vanilla - White label app for your forum
    xDaizu
  • @Linc said:
    We are! Todd used PhpStorm.

    My coding standard always has been "whatever pressing Ctrl+Alt+L in PhpStorm does".
    I can't really care more than that. :lol:

  • @Bleistivt said:
    A few questions regarding the new naming standards:

    • How should Hooks be called? discussionController_render_before or DiscussionController_render_before since it contains a class name?
    • Should plugin names/folders be in camelCase or even lowercase? What about the class name? I see editor is called EditorPlugin for example.
    • What about factory functions that return objects like Gdn::UserModel()?
    • Should new permissions be in camelCase?
    • Should new tables/columns be in camelCase?

    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

    • Vanilla APP » Learn more «
    • iOS & Android App for Vanilla - White label app for your forum
  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    I try to adhere to standards, but already your questions make my head ache... o.O


  • There is no perfect standard it is about constituency. I hope once settled on a standard they stick to it.

    grep is your friend.

  • LincLinc Director of Development Detroit Vanilla Staff
    edited June 2015

    How should Hooks be called?

    discussionController_render_before is correct.

    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.

    Bleistivt
  • LincLinc Director of Development Detroit Vanilla Staff
    edited June 2015

    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.

    Bleistivt
  • LincLinc Director of Development Detroit Vanilla Staff

    Today I figured out how to make CodeSniffer autocorrect all our braces & bool/null casing.

  • LincLinc Director of Development Detroit Vanilla Staff

    Branch the-stagening holds 3 giant PRs combined for testing that we didn't break anything during this process.

  • businessdadbusinessdad Stealth contributor MVP

    @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. :)

Sign In or Register to comment.