[Phpmyadmin-devel] Coding standards - Line length

Michal Čihař michal at cihar.com
Mon May 9 14:10:26 CEST 2011


Hi

Dne Fri, 6 May 2011 12:07:54 +0530
Madhura Jayaratne <madhura.cj at gmail.com> napsal(a):

> Although we have chosen PEAR coding standards[1] as the coding standard for
> phpMyAdmin[2], there are quite a number of occasions where the standard is
> being violated, especially the line length recommendation. For example in
> display_tbl.lib.php I can see lines with 282 character while
> the recommended limit is 75-85[3].

Indeed having that long lines is indeed bad. However I don't feel like
we should strictly limit to 80 chars, because sometimes the code is
much more readable with single slightly longer line (let's say 100
chars) than splitting it up.

> However, I feel that this limit is bit too restrictive given that some lines
> have indentation of about 32 spaces. So I think it's better to set the limit
> bit leniently (at least for those files) and adhering to it rather than
> ignoring the line length limit altogether. Any thoughts?

The big indentation usually shows that code should be split to smaller
functional parts and avoid to much of nesting directly in place.

-- 
	Michal Čihař | http://cihar.com | http://blog.cihar.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20110509/82387b27/attachment.sig>


More information about the Developers mailing list