Page 3 of 3 FirstFirst 123
Results 21 to 23 of 23

Thread: WordPress Coding Standards

  1. #21
    Ryan's Avatar
    Ryan is offline WordPress Legend
    Join Date
    Jan 2009
    Location
    New Zealand
    Posts
    2,797

    Default

    Quote Originally Posted by Elpie View Post
    ... a code beautifier that forces the code to use coding standards ... made into a mandatory step in the plugin checklist, before plugins were added to the repository.
    I think that would annoy far too many people.

    It could be useful for core patches though I guess to make sure they're consistent.

  2. #22
    andreasnrb's Avatar
    andreasnrb is offline Kegger
    Join Date
    Jun 2009
    Posts
    594

    Default

    I mostly use FXCop and occassionaly some other stuff to check code quality with my C# code. Checks for a bunch of things haven't found anything similar for PHP yet.
    I use NAnt to manage my whole development cycle with C#, run tests, check this and that, all ok make release package etc.

  3. #23
    Jacob Santos is offline Hello World
    Join Date
    Jan 2009
    Location
    Branson, Missouri
    Posts
    31

    Default

    One thing to note about most beautifiers is that by default they convert tabs to spaces, because most PHP accepted standards use spaces instead of tabs. You'd have to either hack the beautifier or set the option to not do that, since some realize that not every project is going to use spaces.

    Furthermore, you have the whole issue of rewriting keywords to constants, such as TRUE, FALSE, and NULL, which are technically constants within PHP and confusingly are also type keywords.
    Last edited by Jacob Santos; 12-21-2009 at 09:22 AM. Reason: Prevent adding a new post.

Page 3 of 3 FirstFirst 123

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •