Ok, I will try to set up make a Eclipse Kepler format style same as PSR2
spécifics describe into the wiki.
The fact is in Eclipse Kepler you can set up all the code style
features, that was not possible into 3.7.
And in 3.7 there is no possiblity, as I remember, to export the code
style as XML file.
Also there is a bug into Kepler PSR-2 Built in code style, The
function/method call like
toto(
$a,
$b
);
cannot be done in auto format (new line after the first parenthesis and
before the last one).
I will deal with it and try to get the PSR-2 Dolibarr code style for the
next pull request.
Regards
Florian HENRY
florian.he...@open-concept.pro
+33 6 03 76 48 07
http://www.open-concept.pro
Twitter : @_Open_Concept_
Le 24/02/2014 11:16, Destailleur Laurent a écrit :
We discussed on that few month ago but i forgot to save conclusion
onto developer wiki documentation. I added them onto page:
http://wiki.dolibarr.org/index.php/Language_and_development_rules#PHP_Norms
Conclusion is that we use PSR2 with 2 exceptions (see wiki updated
page). And there is a checkstyle page to check we follow this.
I work with eclipse 3.7 and if you set up correctly (see page
http://wiki.dolibarr.org/index.php/Environment_and_development_tools
and
http://wiki.dolibarr.org/index.php/Environment_and_development_tools_-_Optionnal_components),
everything looks fine for me.
2014-02-23 21:58 GMT+01:00 Florian Henry
<florian.he...@open-concept.pro <mailto:florian.he...@open-concept.pro>>:
Hi,
I was working on stuff in dev branch, and it was long time I
didn't get to commit. I copy-paste some code lines from other
branch or module (to integrate them into the core) and I've seen a
lot of the travis "style" syntax check come into pull request.
I use Eclipse Kepler (4.3) + PDT as IDE. What is yours ?
- Notepad++
- PHP Storm
- Eclipse Indigo (3.7) + PDT
- Eclipse Helios (3.6) + PDT
- Vim
- others
This question is to know, if it's hard for you to do "auto
format" code ?
After lot's of try and adjustement, I think I found a
PHP->Code Style->Formatter Dolibarr syntax that is complaint with
the dev/codesniffer/ruleset.xml.
I put it in attachement. Mostly base one PSR-0 (the default
into Eclipse Kepler 4.3)
I think that the current code style format is the one use by
default by Eclipse Indigo (3.7) or Eclipse Helios (3.6), a code
style that I didn't found by defaut into Eclipse Kepler and seems
not to be a PSR-0 or other standard code style PHP format.
Well, I think it would be nice to use a normalize code style
format like PSR or other one. I think the devcamp will be a good
time to do it. What do you think about it ?
I know I will hate myself, because when I will want to
integrate some code lines from others branches I've done for some
projets, a compare/diff between old and new files will thanks to
me for this brilliant idea. Ok, so lets go to auto format the all
code previous branch and it will do the tricks. andafter that no
more problem with formating check style.
I also know that, for Dolibarr, code style PHP format is not
a important matter. But if it can be done with the agreement of
lot's of person it will be nice.
Regards.
--
Florian HENRY
florian.he...@open-concept.pro <mailto:florian.he...@open-concept.pro>
+33 6 03 76 48 07 <tel:%2B33%206%2003%2076%2048%2007>
http://www.open-concept.pro
Twitter : @_Open_Concept_
_______________________________________________
Dolibarr-dev mailing list
Dolibarr-dev@nongnu.org <mailto:Dolibarr-dev@nongnu.org>
https://lists.nongnu.org/mailman/listinfo/dolibarr-dev
--
Laurent Destailleur (alias Eldy)
------------------------------------------------------------------------------------
Social networks of my OpenSource projects:
Dolibarr Google+: https://plus.google.com/+DolibarrOrg/
Dolibarr Facebook: https://www.facebook.com/dolibarr
Dolibarr Twitter: http://www.twitter.com/dolibarr
AWStats Google+: https://plus.google.com/+AWStatsOrgPoject/
AWStats Facebook: https://www.facebook.com/awstats.org
AWStats Twitter: http://www.twitter.com/astats_project
_______________________________________________
Dolibarr-dev mailing list
Dolibarr-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/dolibarr-dev
_______________________________________________
Dolibarr-dev mailing list
Dolibarr-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/dolibarr-dev