[RFC|Accepted] Coding Guideline Modifications

These requests for comments/change have lead to an implemented feature that has been successfully merged into the 3.1/Ascraeus branch. Everything listed in this forum will be available in phpBB 3.1.
Post Reply
User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: [RFC|Accepted] Coding Guideline Modifications

Post by imkingdavid » Fri Apr 13, 2012 12:29 pm

Also, one thing I noticed we do with docblocks that is different from the example at the link you posted, and I'm not sure how strict this is, but we don't add a space in front of the * to line them up. So instead of:

Code: Select all

/**
 *
 *
 */
We do:

Code: Select all

/**
*
*
*/
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

User avatar
naderman
Product Manager
Product Manager
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany
Contact:

Re: [RFC|Accepted] Coding Guideline Modifications

Post by naderman » Sun Apr 15, 2012 6:37 pm

Yup, I'm not sure why we do. I don't really have a preference either way. Anyone else have any thoughts on that?

User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: [RFC|Accepted] Coding Guideline Modifications

Post by imkingdavid » Sun Apr 15, 2012 7:22 pm

naderman wrote:Yup, I'm not sure why we do. I don't really have a preference either way. Anyone else have any thoughts on that?
Since we already do it without the space, we might as well be consistent and continue to not do it, at least with the 3.x line and then if we want to we can switch for 4.0.
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

User avatar
Noxwizard
Support Team Leader
Support Team Leader
Posts: 135
Joined: Sun Dec 18, 2005 5:44 pm
Location: Texas
Contact:

Re: [RFC|Accepted] Coding Guideline Modifications

Post by Noxwizard » Sun May 13, 2012 6:23 am

Since I've seen it come up in multiple PR reviews, perhaps the request to have a space after descriptive // style comments should be added to the coding guidelines.

User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: [RFC|Accepted] Coding Guideline Modifications

Post by imkingdavid » Sun May 13, 2012 7:24 pm

Noxwizard wrote:Since I've seen it come up in multiple PR reviews, perhaps the request to have a space after descriptive // style comments should be added to the coding guidelines.
Yes, in general, it is much better to have:

Code: Select all

// this
instead of

Code: Select all

//this
The first one looks better IMO and is easier to read. If that is not already in the coding guidelines, IMO it should be added.
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

User avatar
callumacrae
Infrastructure Team
Infrastructure Team
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: [RFC|Accepted] Coding Guideline Modifications

Post by callumacrae » Sun May 13, 2012 9:01 pm

Capital letter!
Made by developers, for developers!
My blog

User avatar
brunoais
Registered User
Posts: 958
Joined: Fri Dec 18, 2009 3:55 pm

Re: [RFC|Accepted] Coding Guideline Modifications

Post by brunoais » Mon May 14, 2012 1:13 pm

callumacrae wrote:Capital letter!
I didn't understand

User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: [RFC|Accepted] Coding Guideline Modifications

Post by imkingdavid » Mon May 14, 2012 2:05 pm

brunoais wrote:
callumacrae wrote:Capital letter!
I didn't understand
He was saying that my examples (//this and // this) should start with capital letters like // This.
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

Oleg
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am
Contact:

Re: [RFC|Accepted] Coding Guideline Modifications

Post by Oleg » Mon May 14, 2012 3:16 pm

imkingdavid wrote:Also, one thing I noticed we do with docblocks that is different from the example at the link you posted, and I'm not sure how strict this is, but we don't add a space in front of the * to line them up. So instead of:

Code: Select all

/**
 *
 *
 */
We do:

Code: Select all

/**
*
*
*/
I find the current style just fine.

User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: [RFC|Accepted] Coding Guideline Modifications

Post by imkingdavid » Mon May 14, 2012 3:37 pm

Oleg wrote:
imkingdavid wrote:Also, one thing I noticed we do with docblocks that is different from the example at the link you posted, and I'm not sure how strict this is, but we don't add a space in front of the * to line them up. So instead of:

Code: Select all

/**
 *
 *
 */
We do:

Code: Select all

/**
*
*
*/
I find the current style just fine.
As do I. I was simply pointing out the difference.
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

Post Reply