dolibarr-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Dolibarr-dev] PHP Standards


From: Laurent Destailleur (eldy)
Subject: Re: [Dolibarr-dev] PHP Standards
Date: Wed, 13 Jun 2012 14:20:38 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20120430 Thunderbird/12.0.1

No. Change should be done (if done) only into source code but not into output strings.
However, i don't think this is usefull. If you setup your editor (for example eclipse into Preferences - General - Editors - Text editors) to set the tab to be 4 spaces, having 4 spaces or a tab into code will be same.

Other rules were already applied into 3.2 or dev branch. There was 14 000 checkstyle errors into 3.1.1. With current version, only 10 errors (and we can't removed them) ! This means an important work was done about style. You will find the rules defined into file dev/codesniffer/rules.xml. And reports available here:
https://doliforge.org/plugins/hudson/?action="">

However, some rules were discarded :
- Tab must be spaces. As explained, if tab is defined to 4 chars, there is absolutely no differences for developer, so no need to use this rule strictly.
- Having line length limited to 80 chars. This rule comes from development rules when screens were text screens limited to 80 chars (you remember the screen green and black of your old amiga or dos pc ?). This rule is, of course, obsolete and having a print taking all screen make code less clear than more.
- The rule " The closing ?> tag MUST be omitted from files containing only PHP" is not used. Because such tip was never confirmed to be good by PHP core dev team, evene if everybody agree to say it can't harm you.
- Some class name or method does not match StudlyCaps or camelCase. Reason is changing this may break compatibility. So we change this, but version after version when we can. For the moment we disabled this checkstyle check.

Other rules seems to be already applied.




Le 13/06/2012 13:41, i.d & l a écrit :
Hi, is it not just something like sed 's/\t/    /'  applied to the whole set of php files ?

Le 13/06/2012 13:33, Florian HENRY a écrit :

I m suprise to read that tab indentation must be avoid. But as it the rule I will do it, if we have to change it on all Dolibarr source code it's a huge work. Part by part may be a good option.

Le 13 juin 2012 12:48, "Doursenaud, Raphaël" <address@hidden> a écrit :
I think we should adopt these ASAP.
This would help everyone.

I have a hard time dealing with the multiple indentation types and braces placements in the Dolibarr source code.


2012/6/12 Régis Houssin <address@hidden>
the PHP Standards Working Group: PSR-0, PSR-1 and PSR-2.
https://github.com/php-fig/fig-standards/tree/master/accepted


Cordialement,
--
Régis Houssin
---------------------------------------------------------
Cap-Networks
Cidex 1130
34, route de Gigny
71240 MARNAY
FRANCE
VoIP: +33 1 83 62 40 03
GSM: +33 6 33 02 07 97
Web: http://www.cap-networks.com/
Email: address@hidden

Dolibarr developer: address@hidden
Web Portal: http://www.dolibarr.fr/
SaaS offers: http://www.dolibox.fr/
Shop: http://www.dolistore.com/
Development platform: https://doliforge.org/
---------------------------------------------------------


_______________________________________________
Dolibarr-dev mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/dolibarr-dev



--
Raphaël Doursenaud
05 35 53 97 13 - 06 68 48 20 10


Technopole Hélioparc
2 avenue du Président Pierre Angot
64053 PAU CEDEX 9
SARL GPC.solutions au capital de 7 500 € - R.C.S. PAU 528 995 921

_______________________________________________
Dolibarr-dev mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/dolibarr-dev



_______________________________________________
Dolibarr-dev mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/dolibarr-dev


_______________________________________________
Dolibarr-dev mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/dolibarr-dev

-- 
Eldy (Laurent Destailleur).
---------------------------------------------------------------
EMail: address@hidden
Web: http://www.destailleur.fr

Dolibarr (Project leader): http://www.dolibarr.org
To make a donation for Dolibarr project via Paypal: address@hidden
AWStats (Author) : http://awstats.sourceforge.net
To make a donation for AWStats project via Paypal: address@hidden
AWBot (Author) : http://awbot.sourceforge.net
CVSChangeLogBuilder (Author) : http://cvschangelogb.sourceforge.net

reply via email to

[Prev in Thread] Current Thread [Next in Thread]