[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 »

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
Consultant
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Berlin, Germany
Contact:

Re: [RFC|Accepted] Coding Guideline Modifications

Post by naderman »

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 »

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: 137
Joined: Sun Dec 18, 2005 5:44 pm
Location: Texas
Contact:

Re: [RFC|Accepted] Coding Guideline Modifications

Post by Noxwizard »

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 »

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
Former Team Member
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: [RFC|Accepted] Coding Guideline Modifications

Post by callumacrae »

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

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

Re: [RFC|Accepted] Coding Guideline Modifications

Post by brunoais »

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 »

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 »

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 »

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