phpBB

Development Discussion Board

phpBB's testing ground of bleeding edge code
Advanced search

[RFC|Accepted] Coding Guideline Modifications

These requests for comments 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.

Re: [RFC|Accepted] Coding Guideline Modifications

Postby 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
imkingdavid
Development Team
Development Team
 
Posts: 905
Joined: Thu Jul 30, 2009 12:06 pm

Re: [RFC|Accepted] Coding Guideline Modifications

Postby 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?
www.naderman.de
Move your forum to Forumatic - we'll take care of maintenance & spam
User avatar
naderman
Development Team Leader
Development Team Leader
 
Posts: 1650
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany

Re: [RFC|Accepted] Coding Guideline Modifications

Postby 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
imkingdavid
Development Team
Development Team
 
Posts: 905
Joined: Thu Jul 30, 2009 12:06 pm

Re: [RFC|Accepted] Coding Guideline Modifications

Postby 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
Noxwizard
Support Team Leader
Support Team Leader
 
Posts: 115
Joined: Sun Dec 18, 2005 5:44 pm
Location: Texas

Re: [RFC|Accepted] Coding Guideline Modifications

Postby 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
imkingdavid
Development Team
Development Team
 
Posts: 905
Joined: Thu Jul 30, 2009 12:06 pm

Re: [RFC|Accepted] Coding Guideline Modifications

Postby callumacrae » Sun May 13, 2012 9:01 pm

Capital letter!
"In JavaScript, there is a beautiful, elegant, highly expressive language that is buried under a steaming pile of good intentions and blunders"
—Douglas Crockford

View my MOD, phpBB Mobile
User avatar
callumacrae
Website Team
Website Team
 
Posts: 883
Joined: Tue Apr 27, 2010 9:37 am
Location: England

Re: [RFC|Accepted] Coding Guideline Modifications

Postby brunoais » Mon May 14, 2012 1:13 pm

callumacrae wrote:Capital letter!

I didn't understand
brunoais
Registered User
 
Posts: 627
Joined: Fri Dec 18, 2009 3:55 pm

Re: [RFC|Accepted] Coding Guideline Modifications

Postby 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.
User avatar
imkingdavid
Development Team
Development Team
 
Posts: 905
Joined: Thu Jul 30, 2009 12:06 pm

Re: [RFC|Accepted] Coding Guideline Modifications

Postby 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.
Oleg
 
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am

Re: [RFC|Accepted] Coding Guideline Modifications

Postby 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.
User avatar
imkingdavid
Development Team
Development Team
 
Posts: 905
Joined: Thu Jul 30, 2009 12:06 pm

Previous

Return to [3.1/Ascraeus] Merged RFCs

Who is online

Users browsing this forum: No registered users and 9 guests