You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Andy Gumbrecht <ag...@tomitribe.com> on 2015/11/19 13:43:15 UTC

PMD & Formatting

Hi everyone,

We keep running into PMD and formatting issues, as well as line ending 
issues. These are just some ideas I'd like to run by you all, but please 
check the line-ending doc. Whatever we decide upon needs to be applied asap.

Line Endings
-----------------
Line ending issues need to be resolved by everyone using this 
documentation (for your OS of choice): 
https://help.github.com/articles/dealing-with-line-endings/ - as 
probably 99.9% of us are GitHub users, this should be the rule.

Please feel free to add to and extend the attributes with anything that 
may be missing, but do not remove the basic structure of: 
https://github.com/apache/tomee/blob/master/.gitattributes

Formatting
---------------
Basically, pressing CTRL+ALT+L (Reformat) should result it the same for 
everyone that is hacking on TomEE. This includes all project files.

The only way this is going to work is if we define a rigid guide or, 
even better, provide an Intellij-IDEA settings import/export file for 
everyone to use as a foundation.

David, as the project lead and our glorious master of all things magic, 
it would be great if you could provide this. I'm going to update the 
site a bit, so would be great to get this added as soon as possible.

Once we have this then a global reformat should be possible across the 
entire project base. Enabling and using @formatter:off/on should be used 
to protect critical sections.

Feedback welcome.

Andy.

-- 
   Andy Gumbrecht
   https://twitter.com/AndyGeeDe
   http://www.tomitribe.com


Re: PMD & Formatting

Posted by Romain Manni-Bucau <rm...@gmail.com>.
While it doesnt change all the codebase and it makes the build - mvn
-failing if not respected +1.
Le 19 nov. 2015 07:31, "Alex Soto" <as...@gmail.com> a écrit :

> I think that a  good way to maintain all code style using the same format
> would be use a tool like Walkmod (http://walkmod.com/) it is only an ida
> of
> course.
>
> Alex
>
> El dj., 19 nov. 2015 a les 16:29, Romain Manni-Bucau (<
> rmannibucau@gmail.com>)
> va escriure:
>
> > Go for it
> > Le 19 nov. 2015 06:54, "Thiago Veronezi" <th...@veronezi.org> a écrit :
> >
> > > Hi guys,
> > >
> > > is anyone going to commit the files with the wrong line endings?
> > >
> > > []s,
> > > Thiago.
> > >
> > >
> > > On Thu, Nov 19, 2015 at 9:38 AM, Romain Manni-Bucau <
> > rmannibucau@gmail.com
> > > >
> > > wrote:
> > >
> > > > +1
> > > >
> > > > Only note: we have a huge codebase so we shouldnt completely reformat
> > it
> > > > IMO. Said otherwise we should ensure the IDE reformatting keeps code
> as
> > > it
> > > > is in 99% of the case
> > > >
> > > > Ps: thks a lot for the github link!
> > > > Le 19 nov. 2015 05:19, "Thiago Veronezi" <th...@veronezi.org> a
> > écrit :
> > > >
> > > > > Formating >>
> > > > >
> > > > > When I introduced the pmd and checkstyle plugins, I've created a
> new
> > > > maven
> > > > > profile in order to keep the simple "mvn clean install" a bit
> faster.
> > > > Maybe
> > > > > we could make it run by default without the extra profile? This
> way,
> > a
> > > > > developer would know right away when she/he introduced any
> formatting
> > > > > violation without depending on any IDE.
> > > > >
> > > > > []s,
> > > > > Thiago.
> > > > >
> > > > >
> > > > > On Thu, Nov 19, 2015 at 7:43 AM, Andy Gumbrecht <
> > > > agumbrecht@tomitribe.com>
> > > > > wrote:
> > > > >
> > > > > > Hi everyone,
> > > > > >
> > > > > > We keep running into PMD and formatting issues, as well as line
> > > ending
> > > > > > issues. These are just some ideas I'd like to run by you all, but
> > > > please
> > > > > > check the line-ending doc. Whatever we decide upon needs to be
> > > applied
> > > > > asap.
> > > > > >
> > > > > > Line Endings
> > > > > > -----------------
> > > > > > Line ending issues need to be resolved by everyone using this
> > > > > > documentation (for your OS of choice):
> > > > > > https://help.github.com/articles/dealing-with-line-endings/ - as
> > > > > probably
> > > > > > 99.9% of us are GitHub users, this should be the rule.
> > > > > >
> > > > > > Please feel free to add to and extend the attributes with
> anything
> > > that
> > > > > > may be missing, but do not remove the basic structure of:
> > > > > > https://github.com/apache/tomee/blob/master/.gitattributes
> > > > > >
> > > > > > Formatting
> > > > > > ---------------
> > > > > > Basically, pressing CTRL+ALT+L (Reformat) should result it the
> same
> > > for
> > > > > > everyone that is hacking on TomEE. This includes all project
> files.
> > > > > >
> > > > > > The only way this is going to work is if we define a rigid guide
> > or,
> > > > even
> > > > > > better, provide an Intellij-IDEA settings import/export file for
> > > > everyone
> > > > > > to use as a foundation.
> > > > > >
> > > > > > David, as the project lead and our glorious master of all things
> > > magic,
> > > > > it
> > > > > > would be great if you could provide this. I'm going to update the
> > > site
> > > > a
> > > > > > bit, so would be great to get this added as soon as possible.
> > > > > >
> > > > > > Once we have this then a global reformat should be possible
> across
> > > the
> > > > > > entire project base. Enabling and using @formatter:off/on should
> be
> > > > used
> > > > > to
> > > > > > protect critical sections.
> > > > > >
> > > > > > Feedback welcome.
> > > > > >
> > > > > > Andy.
> > > > > >
> > > > > > --
> > > > > >   Andy Gumbrecht
> > > > > >   https://twitter.com/AndyGeeDe
> > > > > >   http://www.tomitribe.com
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: PMD & Formatting

Posted by Raquel Pau Fernández <ra...@gmail.com>.
Ok thanks Romain,

I noticed some downloads after this discussion, but I'll wait.

Raquel

2015-12-07 14:36 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:

> Hi Raquel,
>
> 2015-12-07 14:22 GMT+01:00 Raquel Pau Fernández <ra...@gmail.com>:
>
> > Hi Romain,
> >
> > First of all, thank you for all your comments and feedback. I really
> > appreaciate it :). Do you know any other opinions a part from this
> mailing
> > list?
> >
> >
> Didnt hear from anyone else :(
>
>
> > About reporting the failures from the Maven plugin. Remember that this
> tool
> > is to automatically fix code conventions. Therefore, the problems about
> > multiple commits to fix them or mailing lists shouldn't appear, right?
> >
> >
> Right but we should take care of the auto-reformatting side - shouldn't
> impact at all real code. Why? cause we already got noisy-commit cause of
> reformatting which broke code cause of a single line changed but it was
> that hidden in the reformatting that we missed it.
>
>
> > I would be interested in offer a conference talk about the benefits of
> > Walkmod in this project. I would present this formatting issues and a
> > plugin for CheckStyle. Would it be interesting for the project?
> >
> >
> Think we are still stucked on first point there.
>
>
> > Thank you in advance,
> >
> >
> > 2015-11-30 18:30 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:
> >
> > > 2015-11-30 18:23 GMT+01:00 Raquel Pau Fernández <ra...@gmail.com>:
> > >
> > > > Hi Romain,
> > > >
> > > > There is  a maven plugin to execute walkmod during the build process.
> > > This
> > > > is a good option to allow people execute walkmod without any
> > > installation.
> > > >
> > > >
> > > Yep, from some other apache project I know if the build doesnt fail in
> > such
> > > a case then it will never be respected - it is quite the case for tomee
> > > actually where we often commit multiple times to fix just the style
> which
> > > is a pain for the dev but patch readers (mailing list) as well.
> > >
> > >
> > > > Moreover, if  you run "walkmod check", the tool shows in the command
> > line
> > > > the modified files if there is any modification *at syntactic level*
> > (eg,
> > > > remove an import).
> > > >
> > > > However, the tomee conventions, don't change the AST, just rewrite
> the
> > > > files to ensure an specific EOL. Design a checking process at this
> > level
> > > > implies to compare the contents of the file before writing with the
> > > > originals and this could be time consuming. However, if you are
> > > interested
> > > > I can offer an "option" to activate in order to apply this
> comparison.
> > >
> > > Let me know if you need I create a new PR with the maven plugin
> > > > configuration.
> > > >
> > > >
> > > Let's wait other feedbacks before going further but personally it looks
> > > like a potential nice addition - saw few integrations with
> > checkstyle/pmd,
> > > wonder if we can get rid of these plugins using walkmod.
> > >
> > >
> > > > Regards,
> > > >
> > > >
> > > > 2015-11-30 0:27 GMT+01:00 Romain Manni-Bucau <rmannibucau@gmail.com
> >:
> > > >
> > > > > Hi Raquel,
> > > > >
> > > > > added walkmod.xml, apply is quite interesting and nice. We still
> need
> > > to
> > > > > use win EOL for few files - discovered it thanks to your work!:
> > > > >
> > > > > modified:
> > > > > assembly/openejb-standalone/src/main/resources/service.readme.txt
> > > > > modified:
>  tomee/apache-tomee/src/main/resources/service.readme.txt
> > > > >
> > > > > But other ones uses unix one which is respected by walkmod :).
> > > > >
> > > > >
> > > > > Execution on the whole master makes  INFO [main] - Total time:
> 59.304
> > > > > seconds. I would be interested to get a maven integration (mvn
> > package
> > > > > would execute it by module and would make the build failing if
> > > something
> > > > is
> > > > > not respected but wouldnt apply anything by default). Is that
> > something
> > > > > existing?
> > > > >
> > > > > @others: anyone else to test?
> > > > >
> > > > >
> > > > >
> > > > > Romain Manni-Bucau
> > > > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > > > <http://rmannibucau.wordpress.com> | Github <
> > > > > https://github.com/rmannibucau> |
> > > > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> > > > > <http://www.tomitribe.com>
> > > > >
> > > > > 2015-11-27 17:21 GMT+01:00 Raquel Pau Fernández <
> raquelpau@gmail.com
> > >:
> > > > >
> > > > > > Hi,
> > > > > >
> > > > > > According the discussion, I have improved walkmod to allow the
> > > > > > specification of the endline char according a platform.
> > > > > >
> > > > > > I have created a PR with the required configuration for walkmod.
> > You
> > > > juts
> > > > > > need to download and execute the 2.1.0 version from walkmod.com.
> > > > > >
> > > > > > Here my PR:
> > > > > > https://github.com/apache/tomee/pull/28
> > > > > >
> > > > > > Have a good weekend.
> > > > > >
> > > > > > 2015-11-19 21:36 GMT+01:00 Raquel Pau Fernández <
> > raquelpau@gmail.com
> > > >:
> > > > > >
> > > > > > > ok! :-)
> > > > > > > yes, walkmod allows to validate the results locally
> > > > > > > El 19/11/2015 21:34, "Romain Manni-Bucau" <
> rmannibucau@gmail.com
> > >
> > > > > > > escribió:
> > > > > > >
> > > > > > >> @Raquel: happy to have a go with walkmod while it matches the
> > > > > > >> "validate locally" constraint
> > > > > > >>
> > > > > > >> Romain Manni-Bucau
> > > > > > >> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
> > > > > > >>
> > > > > > >>
> > > > > > >> 2015-11-19 12:24 GMT-08:00 Raquel Pau Fernández <
> > > > raquelpau@gmail.com
> > > > > >:
> > > > > > >> > Romain,
> > > > > > >> >
> > > > > > >> > Sorry, but I don't know the final conclusions, then :).Do
> you
> > > > prefer
> > > > > > to
> > > > > > >> try
> > > > > > >> > other tools first to just format or are you interested in
> > > adapting
> > > > > > >> walkmod
> > > > > > >> > to include your conventions?
> > > > > > >> >
> > > > > > >> > In the second case, I would try to find time for it because
> > for
> > > my
> > > > > > >> project,
> > > > > > >> > this is an opportunity. Finally, just one thing to remind,
> > > walkmod
> > > > > > would
> > > > > > >> > allow not just to format conventions, but also any good
> > > > programming
> > > > > > >> > practices that you would to apply (eg. force final
> variables)
> > > > > without
> > > > > > >> > reformatting ;)
> > > > > > >> >
> > > > > > >> > Please, let me know the final conclusions :)
> > > > > > >> > Hi Raquel,
> > > > > > >> >
> > > > > > >> > kind of true. Said otherwise: re-formatting is most of the
> > time
> > > > > > >> > considered as noise so it should only be applied to the
> > changed
> > > > code
> > > > > > >> > and not the code around or the files not modified at all and
> > it
> > > > > should
> > > > > > >> > be done before the commit IMO.
> > > > > > >> >
> > > > > > >> > Starting from scratch it means you can enforce rules easily
> > with
> > > > any
> > > > > > >> > of the tools we spoke about but starting from a big codebase
> > it
> > > > > needs
> > > > > > >> > some more precautions.
> > > > > > >> >
> > > > > > >> >
> > > > > > >> > Romain Manni-Bucau
> > > > > > >> > @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
> > > > > > >> >
> > > > > > >> >
> > > > > > >> > 2015-11-19 10:34 GMT-08:00 Raquel Pau Fernández <
> > > > > raquelpau@gmail.com
> > > > > > >:
> > > > > > >> >> Hi,
> > > > > > >> >>
> > > > > > >> >> Walkmod allows to use a formatter, but I think that the
> > > problems
> > > > > that
> > > > > > >> >> people find are as follows:
> > > > > > >> >>
> > > > > > >> >> - We don't want a big commit with all the source files
> > > > reformatted.
> > > > > > >> >>
> > > > > > >> >> - We don't want to apply the formatter incrementally to
> > avoid a
> > > > set
> > > > > > of
> > > > > > >> >> commits just for formatting issues.
> > > > > > >> >>
> > > > > > >> >> In fact i have found the same problems in Guava. Google is
> > not
> > > > > > >> following
> > > > > > >> >> its own formatter style.
> > > > > > >> >>
> > > > > > >> >> Let me know if I am wrong,
> > > > > > >> >>
> > > > > > >> >> Regards
> > > > > > >> >> El 19/11/2015 18:45, "cchacin" <cc...@gmail.com>
> escribió:
> > > > > > >> >>
> > > > > > >> >>> I use the  Google Style Guide
> > > > > > >> >>> <http://google.github.io/styleguide/javaguide.html>
>  (with
> > > > some
> > > > > > >> >>> modification like 4 spaces) in this way:
> > > > > > >> >>>
> > > > > > >> >>> For Eclipse:
> > > > > > >> >>> You can configure the formatter with this file:
> > > > > > >> >>>
> > > > > > >> >>>
> > > > > > >> >
> > > > > > >>
> > > > > >
> > > > >
> > > >
> > >
> >
> https://github.com/google/styleguide/blob/gh-pages/eclipse-java-google-style.xml
> > > > > > >> >>>
> > > > > > >> >>> For IntelliJ:
> > > > > > >> >>> You can configure the formatter with this file
> > > > > > >> >>>
> > > > > > >> >>>
> > > > > > >> >
> > > > > > >>
> > > > > >
> > > > >
> > > >
> > >
> >
> https://github.com/google/styleguide/blob/gh-pages/intellij-java-google-style.xml
> > > > > > >> >>> Or use the eclipse formatter plugin
> > > > > > >> >>>
> > > > > > >> >>> For Netbeans: use the eclipse formatter plugin
> > > > > > >> >>>
> > > > > > >> >>> And there is a maven plugin
> > > > > > >> >>>
> > > > > > >> >>>
> > > > > > >> >
> > > > > > >>
> > > > > >
> > > > >
> > > >
> > >
> >
> https://maven-java-formatter-plugin.googlecode.com/svn/site/0.4/format-mojo.html
> > > > > > >> >>>
> > > > > > >> >>> One suggestion can be to use a pre-commit hook or a
> webhook
> > in
> > > > > your
> > > > > > >> VCS,
> > > > > > >> > I
> > > > > > >> >>> never use walkmod before but probably we can configure a
> > hook
> > > > with
> > > > > > >> > walkmod
> > > > > > >> >>> also. I think the most important part is to have the
> common
> > > > > > >> configuration
> > > > > > >> >>> file wih the desired styles.
> > > > > > >> >>>
> > > > > > >> >>>
> > > > > > >> >>>
> > > > > > >> >>> -----
> > > > > > >> >>> Carlos Chacin
> > > > > > >> >>> http://github.com/cchacin
> > > > > > >> >>> --
> > > > > > >> >>> View this message in context:
> > > > > > >> >>>
> > > > > > >> >
> > > > > > >>
> > > > > >
> > > > >
> > > >
> > >
> >
> http://tomee-openejb.979440.n4.nabble.com/PMD-Formatting-tp4676866p4676884.html
> > > > > > >> >>> Sent from the TomEE Dev mailing list archive at
> Nabble.com.
> > > > > > >> >>>
> > > > > > >>
> > > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Raquel Pau
> > > > > >
> > > > > > *"Education is the most powerful weapon which you can use to
> change
> > > the
> > > > > > world**"*
> > > > > >
> > > > > > Nelson Mandela
> > > > > >
> > > > > > personal page:
> > > > > > http://sites.google.com/site/raquelpau/
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Raquel Pau
> > > >
> > > > *"Education is the most powerful weapon which you can use to change
> the
> > > > world**"*
> > > >
> > > > Nelson Mandela
> > > >
> > > > personal page:
> > > > http://sites.google.com/site/raquelpau/
> > > >
> > >
> >
> >
> >
> > --
> > Raquel Pau
> >
> > *"Education is the most powerful weapon which you can use to change the
> > world**"*
> >
> > Nelson Mandela
> >
> > personal page:
> > http://sites.google.com/site/raquelpau/
> >
>



-- 
Raquel Pau

*"Education is the most powerful weapon which you can use to change the
world**"*

Nelson Mandela

personal page:
http://sites.google.com/site/raquelpau/

Re: PMD & Formatting

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi Raquel,

2015-12-07 14:22 GMT+01:00 Raquel Pau Fernández <ra...@gmail.com>:

> Hi Romain,
>
> First of all, thank you for all your comments and feedback. I really
> appreaciate it :). Do you know any other opinions a part from this mailing
> list?
>
>
Didnt hear from anyone else :(


> About reporting the failures from the Maven plugin. Remember that this tool
> is to automatically fix code conventions. Therefore, the problems about
> multiple commits to fix them or mailing lists shouldn't appear, right?
>
>
Right but we should take care of the auto-reformatting side - shouldn't
impact at all real code. Why? cause we already got noisy-commit cause of
reformatting which broke code cause of a single line changed but it was
that hidden in the reformatting that we missed it.


> I would be interested in offer a conference talk about the benefits of
> Walkmod in this project. I would present this formatting issues and a
> plugin for CheckStyle. Would it be interesting for the project?
>
>
Think we are still stucked on first point there.


> Thank you in advance,
>
>
> 2015-11-30 18:30 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:
>
> > 2015-11-30 18:23 GMT+01:00 Raquel Pau Fernández <ra...@gmail.com>:
> >
> > > Hi Romain,
> > >
> > > There is  a maven plugin to execute walkmod during the build process.
> > This
> > > is a good option to allow people execute walkmod without any
> > installation.
> > >
> > >
> > Yep, from some other apache project I know if the build doesnt fail in
> such
> > a case then it will never be respected - it is quite the case for tomee
> > actually where we often commit multiple times to fix just the style which
> > is a pain for the dev but patch readers (mailing list) as well.
> >
> >
> > > Moreover, if  you run "walkmod check", the tool shows in the command
> line
> > > the modified files if there is any modification *at syntactic level*
> (eg,
> > > remove an import).
> > >
> > > However, the tomee conventions, don't change the AST, just rewrite the
> > > files to ensure an specific EOL. Design a checking process at this
> level
> > > implies to compare the contents of the file before writing with the
> > > originals and this could be time consuming. However, if you are
> > interested
> > > I can offer an "option" to activate in order to apply this comparison.
> >
> > Let me know if you need I create a new PR with the maven plugin
> > > configuration.
> > >
> > >
> > Let's wait other feedbacks before going further but personally it looks
> > like a potential nice addition - saw few integrations with
> checkstyle/pmd,
> > wonder if we can get rid of these plugins using walkmod.
> >
> >
> > > Regards,
> > >
> > >
> > > 2015-11-30 0:27 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:
> > >
> > > > Hi Raquel,
> > > >
> > > > added walkmod.xml, apply is quite interesting and nice. We still need
> > to
> > > > use win EOL for few files - discovered it thanks to your work!:
> > > >
> > > > modified:
> > > > assembly/openejb-standalone/src/main/resources/service.readme.txt
> > > > modified:   tomee/apache-tomee/src/main/resources/service.readme.txt
> > > >
> > > > But other ones uses unix one which is respected by walkmod :).
> > > >
> > > >
> > > > Execution on the whole master makes  INFO [main] - Total time: 59.304
> > > > seconds. I would be interested to get a maven integration (mvn
> package
> > > > would execute it by module and would make the build failing if
> > something
> > > is
> > > > not respected but wouldnt apply anything by default). Is that
> something
> > > > existing?
> > > >
> > > > @others: anyone else to test?
> > > >
> > > >
> > > >
> > > > Romain Manni-Bucau
> > > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > > <http://rmannibucau.wordpress.com> | Github <
> > > > https://github.com/rmannibucau> |
> > > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> > > > <http://www.tomitribe.com>
> > > >
> > > > 2015-11-27 17:21 GMT+01:00 Raquel Pau Fernández <raquelpau@gmail.com
> >:
> > > >
> > > > > Hi,
> > > > >
> > > > > According the discussion, I have improved walkmod to allow the
> > > > > specification of the endline char according a platform.
> > > > >
> > > > > I have created a PR with the required configuration for walkmod.
> You
> > > juts
> > > > > need to download and execute the 2.1.0 version from walkmod.com.
> > > > >
> > > > > Here my PR:
> > > > > https://github.com/apache/tomee/pull/28
> > > > >
> > > > > Have a good weekend.
> > > > >
> > > > > 2015-11-19 21:36 GMT+01:00 Raquel Pau Fernández <
> raquelpau@gmail.com
> > >:
> > > > >
> > > > > > ok! :-)
> > > > > > yes, walkmod allows to validate the results locally
> > > > > > El 19/11/2015 21:34, "Romain Manni-Bucau" <rmannibucau@gmail.com
> >
> > > > > > escribió:
> > > > > >
> > > > > >> @Raquel: happy to have a go with walkmod while it matches the
> > > > > >> "validate locally" constraint
> > > > > >>
> > > > > >> Romain Manni-Bucau
> > > > > >> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
> > > > > >>
> > > > > >>
> > > > > >> 2015-11-19 12:24 GMT-08:00 Raquel Pau Fernández <
> > > raquelpau@gmail.com
> > > > >:
> > > > > >> > Romain,
> > > > > >> >
> > > > > >> > Sorry, but I don't know the final conclusions, then :).Do you
> > > prefer
> > > > > to
> > > > > >> try
> > > > > >> > other tools first to just format or are you interested in
> > adapting
> > > > > >> walkmod
> > > > > >> > to include your conventions?
> > > > > >> >
> > > > > >> > In the second case, I would try to find time for it because
> for
> > my
> > > > > >> project,
> > > > > >> > this is an opportunity. Finally, just one thing to remind,
> > walkmod
> > > > > would
> > > > > >> > allow not just to format conventions, but also any good
> > > programming
> > > > > >> > practices that you would to apply (eg. force final variables)
> > > > without
> > > > > >> > reformatting ;)
> > > > > >> >
> > > > > >> > Please, let me know the final conclusions :)
> > > > > >> > Hi Raquel,
> > > > > >> >
> > > > > >> > kind of true. Said otherwise: re-formatting is most of the
> time
> > > > > >> > considered as noise so it should only be applied to the
> changed
> > > code
> > > > > >> > and not the code around or the files not modified at all and
> it
> > > > should
> > > > > >> > be done before the commit IMO.
> > > > > >> >
> > > > > >> > Starting from scratch it means you can enforce rules easily
> with
> > > any
> > > > > >> > of the tools we spoke about but starting from a big codebase
> it
> > > > needs
> > > > > >> > some more precautions.
> > > > > >> >
> > > > > >> >
> > > > > >> > Romain Manni-Bucau
> > > > > >> > @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
> > > > > >> >
> > > > > >> >
> > > > > >> > 2015-11-19 10:34 GMT-08:00 Raquel Pau Fernández <
> > > > raquelpau@gmail.com
> > > > > >:
> > > > > >> >> Hi,
> > > > > >> >>
> > > > > >> >> Walkmod allows to use a formatter, but I think that the
> > problems
> > > > that
> > > > > >> >> people find are as follows:
> > > > > >> >>
> > > > > >> >> - We don't want a big commit with all the source files
> > > reformatted.
> > > > > >> >>
> > > > > >> >> - We don't want to apply the formatter incrementally to
> avoid a
> > > set
> > > > > of
> > > > > >> >> commits just for formatting issues.
> > > > > >> >>
> > > > > >> >> In fact i have found the same problems in Guava. Google is
> not
> > > > > >> following
> > > > > >> >> its own formatter style.
> > > > > >> >>
> > > > > >> >> Let me know if I am wrong,
> > > > > >> >>
> > > > > >> >> Regards
> > > > > >> >> El 19/11/2015 18:45, "cchacin" <cc...@gmail.com> escribió:
> > > > > >> >>
> > > > > >> >>> I use the  Google Style Guide
> > > > > >> >>> <http://google.github.io/styleguide/javaguide.html>   (with
> > > some
> > > > > >> >>> modification like 4 spaces) in this way:
> > > > > >> >>>
> > > > > >> >>> For Eclipse:
> > > > > >> >>> You can configure the formatter with this file:
> > > > > >> >>>
> > > > > >> >>>
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> https://github.com/google/styleguide/blob/gh-pages/eclipse-java-google-style.xml
> > > > > >> >>>
> > > > > >> >>> For IntelliJ:
> > > > > >> >>> You can configure the formatter with this file
> > > > > >> >>>
> > > > > >> >>>
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> https://github.com/google/styleguide/blob/gh-pages/intellij-java-google-style.xml
> > > > > >> >>> Or use the eclipse formatter plugin
> > > > > >> >>>
> > > > > >> >>> For Netbeans: use the eclipse formatter plugin
> > > > > >> >>>
> > > > > >> >>> And there is a maven plugin
> > > > > >> >>>
> > > > > >> >>>
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> https://maven-java-formatter-plugin.googlecode.com/svn/site/0.4/format-mojo.html
> > > > > >> >>>
> > > > > >> >>> One suggestion can be to use a pre-commit hook or a webhook
> in
> > > > your
> > > > > >> VCS,
> > > > > >> > I
> > > > > >> >>> never use walkmod before but probably we can configure a
> hook
> > > with
> > > > > >> > walkmod
> > > > > >> >>> also. I think the most important part is to have the common
> > > > > >> configuration
> > > > > >> >>> file wih the desired styles.
> > > > > >> >>>
> > > > > >> >>>
> > > > > >> >>>
> > > > > >> >>> -----
> > > > > >> >>> Carlos Chacin
> > > > > >> >>> http://github.com/cchacin
> > > > > >> >>> --
> > > > > >> >>> View this message in context:
> > > > > >> >>>
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> http://tomee-openejb.979440.n4.nabble.com/PMD-Formatting-tp4676866p4676884.html
> > > > > >> >>> Sent from the TomEE Dev mailing list archive at Nabble.com.
> > > > > >> >>>
> > > > > >>
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Raquel Pau
> > > > >
> > > > > *"Education is the most powerful weapon which you can use to change
> > the
> > > > > world**"*
> > > > >
> > > > > Nelson Mandela
> > > > >
> > > > > personal page:
> > > > > http://sites.google.com/site/raquelpau/
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Raquel Pau
> > >
> > > *"Education is the most powerful weapon which you can use to change the
> > > world**"*
> > >
> > > Nelson Mandela
> > >
> > > personal page:
> > > http://sites.google.com/site/raquelpau/
> > >
> >
>
>
>
> --
> Raquel Pau
>
> *"Education is the most powerful weapon which you can use to change the
> world**"*
>
> Nelson Mandela
>
> personal page:
> http://sites.google.com/site/raquelpau/
>

Re: PMD & Formatting

Posted by Raquel Pau Fernández <ra...@gmail.com>.
Hi Romain,

First of all, thank you for all your comments and feedback. I really
appreaciate it :). Do you know any other opinions a part from this mailing
list?

About reporting the failures from the Maven plugin. Remember that this tool
is to automatically fix code conventions. Therefore, the problems about
multiple commits to fix them or mailing lists shouldn't appear, right?

I would be interested in offer a conference talk about the benefits of
Walkmod in this project. I would present this formatting issues and a
plugin for CheckStyle. Would it be interesting for the project?

Thank you in advance,


2015-11-30 18:30 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:

> 2015-11-30 18:23 GMT+01:00 Raquel Pau Fernández <ra...@gmail.com>:
>
> > Hi Romain,
> >
> > There is  a maven plugin to execute walkmod during the build process.
> This
> > is a good option to allow people execute walkmod without any
> installation.
> >
> >
> Yep, from some other apache project I know if the build doesnt fail in such
> a case then it will never be respected - it is quite the case for tomee
> actually where we often commit multiple times to fix just the style which
> is a pain for the dev but patch readers (mailing list) as well.
>
>
> > Moreover, if  you run "walkmod check", the tool shows in the command line
> > the modified files if there is any modification *at syntactic level* (eg,
> > remove an import).
> >
> > However, the tomee conventions, don't change the AST, just rewrite the
> > files to ensure an specific EOL. Design a checking process at this level
> > implies to compare the contents of the file before writing with the
> > originals and this could be time consuming. However, if you are
> interested
> > I can offer an "option" to activate in order to apply this comparison.
>
> Let me know if you need I create a new PR with the maven plugin
> > configuration.
> >
> >
> Let's wait other feedbacks before going further but personally it looks
> like a potential nice addition - saw few integrations with checkstyle/pmd,
> wonder if we can get rid of these plugins using walkmod.
>
>
> > Regards,
> >
> >
> > 2015-11-30 0:27 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:
> >
> > > Hi Raquel,
> > >
> > > added walkmod.xml, apply is quite interesting and nice. We still need
> to
> > > use win EOL for few files - discovered it thanks to your work!:
> > >
> > > modified:
> > > assembly/openejb-standalone/src/main/resources/service.readme.txt
> > > modified:   tomee/apache-tomee/src/main/resources/service.readme.txt
> > >
> > > But other ones uses unix one which is respected by walkmod :).
> > >
> > >
> > > Execution on the whole master makes  INFO [main] - Total time: 59.304
> > > seconds. I would be interested to get a maven integration (mvn package
> > > would execute it by module and would make the build failing if
> something
> > is
> > > not respected but wouldnt apply anything by default). Is that something
> > > existing?
> > >
> > > @others: anyone else to test?
> > >
> > >
> > >
> > > Romain Manni-Bucau
> > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > <http://rmannibucau.wordpress.com> | Github <
> > > https://github.com/rmannibucau> |
> > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> > > <http://www.tomitribe.com>
> > >
> > > 2015-11-27 17:21 GMT+01:00 Raquel Pau Fernández <ra...@gmail.com>:
> > >
> > > > Hi,
> > > >
> > > > According the discussion, I have improved walkmod to allow the
> > > > specification of the endline char according a platform.
> > > >
> > > > I have created a PR with the required configuration for walkmod. You
> > juts
> > > > need to download and execute the 2.1.0 version from walkmod.com.
> > > >
> > > > Here my PR:
> > > > https://github.com/apache/tomee/pull/28
> > > >
> > > > Have a good weekend.
> > > >
> > > > 2015-11-19 21:36 GMT+01:00 Raquel Pau Fernández <raquelpau@gmail.com
> >:
> > > >
> > > > > ok! :-)
> > > > > yes, walkmod allows to validate the results locally
> > > > > El 19/11/2015 21:34, "Romain Manni-Bucau" <rm...@gmail.com>
> > > > > escribió:
> > > > >
> > > > >> @Raquel: happy to have a go with walkmod while it matches the
> > > > >> "validate locally" constraint
> > > > >>
> > > > >> Romain Manni-Bucau
> > > > >> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
> > > > >>
> > > > >>
> > > > >> 2015-11-19 12:24 GMT-08:00 Raquel Pau Fernández <
> > raquelpau@gmail.com
> > > >:
> > > > >> > Romain,
> > > > >> >
> > > > >> > Sorry, but I don't know the final conclusions, then :).Do you
> > prefer
> > > > to
> > > > >> try
> > > > >> > other tools first to just format or are you interested in
> adapting
> > > > >> walkmod
> > > > >> > to include your conventions?
> > > > >> >
> > > > >> > In the second case, I would try to find time for it because for
> my
> > > > >> project,
> > > > >> > this is an opportunity. Finally, just one thing to remind,
> walkmod
> > > > would
> > > > >> > allow not just to format conventions, but also any good
> > programming
> > > > >> > practices that you would to apply (eg. force final variables)
> > > without
> > > > >> > reformatting ;)
> > > > >> >
> > > > >> > Please, let me know the final conclusions :)
> > > > >> > Hi Raquel,
> > > > >> >
> > > > >> > kind of true. Said otherwise: re-formatting is most of the time
> > > > >> > considered as noise so it should only be applied to the changed
> > code
> > > > >> > and not the code around or the files not modified at all and it
> > > should
> > > > >> > be done before the commit IMO.
> > > > >> >
> > > > >> > Starting from scratch it means you can enforce rules easily with
> > any
> > > > >> > of the tools we spoke about but starting from a big codebase it
> > > needs
> > > > >> > some more precautions.
> > > > >> >
> > > > >> >
> > > > >> > Romain Manni-Bucau
> > > > >> > @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
> > > > >> >
> > > > >> >
> > > > >> > 2015-11-19 10:34 GMT-08:00 Raquel Pau Fernández <
> > > raquelpau@gmail.com
> > > > >:
> > > > >> >> Hi,
> > > > >> >>
> > > > >> >> Walkmod allows to use a formatter, but I think that the
> problems
> > > that
> > > > >> >> people find are as follows:
> > > > >> >>
> > > > >> >> - We don't want a big commit with all the source files
> > reformatted.
> > > > >> >>
> > > > >> >> - We don't want to apply the formatter incrementally to avoid a
> > set
> > > > of
> > > > >> >> commits just for formatting issues.
> > > > >> >>
> > > > >> >> In fact i have found the same problems in Guava. Google is not
> > > > >> following
> > > > >> >> its own formatter style.
> > > > >> >>
> > > > >> >> Let me know if I am wrong,
> > > > >> >>
> > > > >> >> Regards
> > > > >> >> El 19/11/2015 18:45, "cchacin" <cc...@gmail.com> escribió:
> > > > >> >>
> > > > >> >>> I use the  Google Style Guide
> > > > >> >>> <http://google.github.io/styleguide/javaguide.html>   (with
> > some
> > > > >> >>> modification like 4 spaces) in this way:
> > > > >> >>>
> > > > >> >>> For Eclipse:
> > > > >> >>> You can configure the formatter with this file:
> > > > >> >>>
> > > > >> >>>
> > > > >> >
> > > > >>
> > > >
> > >
> >
> https://github.com/google/styleguide/blob/gh-pages/eclipse-java-google-style.xml
> > > > >> >>>
> > > > >> >>> For IntelliJ:
> > > > >> >>> You can configure the formatter with this file
> > > > >> >>>
> > > > >> >>>
> > > > >> >
> > > > >>
> > > >
> > >
> >
> https://github.com/google/styleguide/blob/gh-pages/intellij-java-google-style.xml
> > > > >> >>> Or use the eclipse formatter plugin
> > > > >> >>>
> > > > >> >>> For Netbeans: use the eclipse formatter plugin
> > > > >> >>>
> > > > >> >>> And there is a maven plugin
> > > > >> >>>
> > > > >> >>>
> > > > >> >
> > > > >>
> > > >
> > >
> >
> https://maven-java-formatter-plugin.googlecode.com/svn/site/0.4/format-mojo.html
> > > > >> >>>
> > > > >> >>> One suggestion can be to use a pre-commit hook or a webhook in
> > > your
> > > > >> VCS,
> > > > >> > I
> > > > >> >>> never use walkmod before but probably we can configure a hook
> > with
> > > > >> > walkmod
> > > > >> >>> also. I think the most important part is to have the common
> > > > >> configuration
> > > > >> >>> file wih the desired styles.
> > > > >> >>>
> > > > >> >>>
> > > > >> >>>
> > > > >> >>> -----
> > > > >> >>> Carlos Chacin
> > > > >> >>> http://github.com/cchacin
> > > > >> >>> --
> > > > >> >>> View this message in context:
> > > > >> >>>
> > > > >> >
> > > > >>
> > > >
> > >
> >
> http://tomee-openejb.979440.n4.nabble.com/PMD-Formatting-tp4676866p4676884.html
> > > > >> >>> Sent from the TomEE Dev mailing list archive at Nabble.com.
> > > > >> >>>
> > > > >>
> > > > >
> > > >
> > > >
> > > > --
> > > > Raquel Pau
> > > >
> > > > *"Education is the most powerful weapon which you can use to change
> the
> > > > world**"*
> > > >
> > > > Nelson Mandela
> > > >
> > > > personal page:
> > > > http://sites.google.com/site/raquelpau/
> > > >
> > >
> >
> >
> >
> > --
> > Raquel Pau
> >
> > *"Education is the most powerful weapon which you can use to change the
> > world**"*
> >
> > Nelson Mandela
> >
> > personal page:
> > http://sites.google.com/site/raquelpau/
> >
>



-- 
Raquel Pau

*"Education is the most powerful weapon which you can use to change the
world**"*

Nelson Mandela

personal page:
http://sites.google.com/site/raquelpau/

Re: PMD & Formatting

Posted by Romain Manni-Bucau <rm...@gmail.com>.
2015-11-30 18:23 GMT+01:00 Raquel Pau Fernández <ra...@gmail.com>:

> Hi Romain,
>
> There is  a maven plugin to execute walkmod during the build process. This
> is a good option to allow people execute walkmod without any installation.
>
>
Yep, from some other apache project I know if the build doesnt fail in such
a case then it will never be respected - it is quite the case for tomee
actually where we often commit multiple times to fix just the style which
is a pain for the dev but patch readers (mailing list) as well.


> Moreover, if  you run "walkmod check", the tool shows in the command line
> the modified files if there is any modification *at syntactic level* (eg,
> remove an import).
>
> However, the tomee conventions, don't change the AST, just rewrite the
> files to ensure an specific EOL. Design a checking process at this level
> implies to compare the contents of the file before writing with the
> originals and this could be time consuming. However, if you are interested
> I can offer an "option" to activate in order to apply this comparison.

Let me know if you need I create a new PR with the maven plugin
> configuration.
>
>
Let's wait other feedbacks before going further but personally it looks
like a potential nice addition - saw few integrations with checkstyle/pmd,
wonder if we can get rid of these plugins using walkmod.


> Regards,
>
>
> 2015-11-30 0:27 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:
>
> > Hi Raquel,
> >
> > added walkmod.xml, apply is quite interesting and nice. We still need to
> > use win EOL for few files - discovered it thanks to your work!:
> >
> > modified:
> > assembly/openejb-standalone/src/main/resources/service.readme.txt
> > modified:   tomee/apache-tomee/src/main/resources/service.readme.txt
> >
> > But other ones uses unix one which is respected by walkmod :).
> >
> >
> > Execution on the whole master makes  INFO [main] - Total time: 59.304
> > seconds. I would be interested to get a maven integration (mvn package
> > would execute it by module and would make the build failing if something
> is
> > not respected but wouldnt apply anything by default). Is that something
> > existing?
> >
> > @others: anyone else to test?
> >
> >
> >
> > Romain Manni-Bucau
> > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > <http://rmannibucau.wordpress.com> | Github <
> > https://github.com/rmannibucau> |
> > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> > <http://www.tomitribe.com>
> >
> > 2015-11-27 17:21 GMT+01:00 Raquel Pau Fernández <ra...@gmail.com>:
> >
> > > Hi,
> > >
> > > According the discussion, I have improved walkmod to allow the
> > > specification of the endline char according a platform.
> > >
> > > I have created a PR with the required configuration for walkmod. You
> juts
> > > need to download and execute the 2.1.0 version from walkmod.com.
> > >
> > > Here my PR:
> > > https://github.com/apache/tomee/pull/28
> > >
> > > Have a good weekend.
> > >
> > > 2015-11-19 21:36 GMT+01:00 Raquel Pau Fernández <ra...@gmail.com>:
> > >
> > > > ok! :-)
> > > > yes, walkmod allows to validate the results locally
> > > > El 19/11/2015 21:34, "Romain Manni-Bucau" <rm...@gmail.com>
> > > > escribió:
> > > >
> > > >> @Raquel: happy to have a go with walkmod while it matches the
> > > >> "validate locally" constraint
> > > >>
> > > >> Romain Manni-Bucau
> > > >> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
> > > >>
> > > >>
> > > >> 2015-11-19 12:24 GMT-08:00 Raquel Pau Fernández <
> raquelpau@gmail.com
> > >:
> > > >> > Romain,
> > > >> >
> > > >> > Sorry, but I don't know the final conclusions, then :).Do you
> prefer
> > > to
> > > >> try
> > > >> > other tools first to just format or are you interested in adapting
> > > >> walkmod
> > > >> > to include your conventions?
> > > >> >
> > > >> > In the second case, I would try to find time for it because for my
> > > >> project,
> > > >> > this is an opportunity. Finally, just one thing to remind, walkmod
> > > would
> > > >> > allow not just to format conventions, but also any good
> programming
> > > >> > practices that you would to apply (eg. force final variables)
> > without
> > > >> > reformatting ;)
> > > >> >
> > > >> > Please, let me know the final conclusions :)
> > > >> > Hi Raquel,
> > > >> >
> > > >> > kind of true. Said otherwise: re-formatting is most of the time
> > > >> > considered as noise so it should only be applied to the changed
> code
> > > >> > and not the code around or the files not modified at all and it
> > should
> > > >> > be done before the commit IMO.
> > > >> >
> > > >> > Starting from scratch it means you can enforce rules easily with
> any
> > > >> > of the tools we spoke about but starting from a big codebase it
> > needs
> > > >> > some more precautions.
> > > >> >
> > > >> >
> > > >> > Romain Manni-Bucau
> > > >> > @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
> > > >> >
> > > >> >
> > > >> > 2015-11-19 10:34 GMT-08:00 Raquel Pau Fernández <
> > raquelpau@gmail.com
> > > >:
> > > >> >> Hi,
> > > >> >>
> > > >> >> Walkmod allows to use a formatter, but I think that the problems
> > that
> > > >> >> people find are as follows:
> > > >> >>
> > > >> >> - We don't want a big commit with all the source files
> reformatted.
> > > >> >>
> > > >> >> - We don't want to apply the formatter incrementally to avoid a
> set
> > > of
> > > >> >> commits just for formatting issues.
> > > >> >>
> > > >> >> In fact i have found the same problems in Guava. Google is not
> > > >> following
> > > >> >> its own formatter style.
> > > >> >>
> > > >> >> Let me know if I am wrong,
> > > >> >>
> > > >> >> Regards
> > > >> >> El 19/11/2015 18:45, "cchacin" <cc...@gmail.com> escribió:
> > > >> >>
> > > >> >>> I use the  Google Style Guide
> > > >> >>> <http://google.github.io/styleguide/javaguide.html>   (with
> some
> > > >> >>> modification like 4 spaces) in this way:
> > > >> >>>
> > > >> >>> For Eclipse:
> > > >> >>> You can configure the formatter with this file:
> > > >> >>>
> > > >> >>>
> > > >> >
> > > >>
> > >
> >
> https://github.com/google/styleguide/blob/gh-pages/eclipse-java-google-style.xml
> > > >> >>>
> > > >> >>> For IntelliJ:
> > > >> >>> You can configure the formatter with this file
> > > >> >>>
> > > >> >>>
> > > >> >
> > > >>
> > >
> >
> https://github.com/google/styleguide/blob/gh-pages/intellij-java-google-style.xml
> > > >> >>> Or use the eclipse formatter plugin
> > > >> >>>
> > > >> >>> For Netbeans: use the eclipse formatter plugin
> > > >> >>>
> > > >> >>> And there is a maven plugin
> > > >> >>>
> > > >> >>>
> > > >> >
> > > >>
> > >
> >
> https://maven-java-formatter-plugin.googlecode.com/svn/site/0.4/format-mojo.html
> > > >> >>>
> > > >> >>> One suggestion can be to use a pre-commit hook or a webhook in
> > your
> > > >> VCS,
> > > >> > I
> > > >> >>> never use walkmod before but probably we can configure a hook
> with
> > > >> > walkmod
> > > >> >>> also. I think the most important part is to have the common
> > > >> configuration
> > > >> >>> file wih the desired styles.
> > > >> >>>
> > > >> >>>
> > > >> >>>
> > > >> >>> -----
> > > >> >>> Carlos Chacin
> > > >> >>> http://github.com/cchacin
> > > >> >>> --
> > > >> >>> View this message in context:
> > > >> >>>
> > > >> >
> > > >>
> > >
> >
> http://tomee-openejb.979440.n4.nabble.com/PMD-Formatting-tp4676866p4676884.html
> > > >> >>> Sent from the TomEE Dev mailing list archive at Nabble.com.
> > > >> >>>
> > > >>
> > > >
> > >
> > >
> > > --
> > > Raquel Pau
> > >
> > > *"Education is the most powerful weapon which you can use to change the
> > > world**"*
> > >
> > > Nelson Mandela
> > >
> > > personal page:
> > > http://sites.google.com/site/raquelpau/
> > >
> >
>
>
>
> --
> Raquel Pau
>
> *"Education is the most powerful weapon which you can use to change the
> world**"*
>
> Nelson Mandela
>
> personal page:
> http://sites.google.com/site/raquelpau/
>

Re: PMD & Formatting

Posted by Raquel Pau Fernández <ra...@gmail.com>.
Hi Romain,

There is  a maven plugin to execute walkmod during the build process. This
is a good option to allow people execute walkmod without any installation.

Moreover, if  you run "walkmod check", the tool shows in the command line
the modified files if there is any modification *at syntactic level* (eg,
remove an import).

However, the tomee conventions, don't change the AST, just rewrite the
files to ensure an specific EOL. Design a checking process at this level
implies to compare the contents of the file before writing with the
originals and this could be time consuming. However, if you are interested
I can offer an "option" to activate in order to apply this comparison.

Let me know if you need I create a new PR with the maven plugin
configuration.

Regards,


2015-11-30 0:27 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:

> Hi Raquel,
>
> added walkmod.xml, apply is quite interesting and nice. We still need to
> use win EOL for few files - discovered it thanks to your work!:
>
> modified:
> assembly/openejb-standalone/src/main/resources/service.readme.txt
> modified:   tomee/apache-tomee/src/main/resources/service.readme.txt
>
> But other ones uses unix one which is respected by walkmod :).
>
>
> Execution on the whole master makes  INFO [main] - Total time: 59.304
> seconds. I would be interested to get a maven integration (mvn package
> would execute it by module and would make the build failing if something is
> not respected but wouldnt apply anything by default). Is that something
> existing?
>
> @others: anyone else to test?
>
>
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <http://rmannibucau.wordpress.com> | Github <
> https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> <http://www.tomitribe.com>
>
> 2015-11-27 17:21 GMT+01:00 Raquel Pau Fernández <ra...@gmail.com>:
>
> > Hi,
> >
> > According the discussion, I have improved walkmod to allow the
> > specification of the endline char according a platform.
> >
> > I have created a PR with the required configuration for walkmod. You juts
> > need to download and execute the 2.1.0 version from walkmod.com.
> >
> > Here my PR:
> > https://github.com/apache/tomee/pull/28
> >
> > Have a good weekend.
> >
> > 2015-11-19 21:36 GMT+01:00 Raquel Pau Fernández <ra...@gmail.com>:
> >
> > > ok! :-)
> > > yes, walkmod allows to validate the results locally
> > > El 19/11/2015 21:34, "Romain Manni-Bucau" <rm...@gmail.com>
> > > escribió:
> > >
> > >> @Raquel: happy to have a go with walkmod while it matches the
> > >> "validate locally" constraint
> > >>
> > >> Romain Manni-Bucau
> > >> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
> > >>
> > >>
> > >> 2015-11-19 12:24 GMT-08:00 Raquel Pau Fernández <raquelpau@gmail.com
> >:
> > >> > Romain,
> > >> >
> > >> > Sorry, but I don't know the final conclusions, then :).Do you prefer
> > to
> > >> try
> > >> > other tools first to just format or are you interested in adapting
> > >> walkmod
> > >> > to include your conventions?
> > >> >
> > >> > In the second case, I would try to find time for it because for my
> > >> project,
> > >> > this is an opportunity. Finally, just one thing to remind, walkmod
> > would
> > >> > allow not just to format conventions, but also any good programming
> > >> > practices that you would to apply (eg. force final variables)
> without
> > >> > reformatting ;)
> > >> >
> > >> > Please, let me know the final conclusions :)
> > >> > Hi Raquel,
> > >> >
> > >> > kind of true. Said otherwise: re-formatting is most of the time
> > >> > considered as noise so it should only be applied to the changed code
> > >> > and not the code around or the files not modified at all and it
> should
> > >> > be done before the commit IMO.
> > >> >
> > >> > Starting from scratch it means you can enforce rules easily with any
> > >> > of the tools we spoke about but starting from a big codebase it
> needs
> > >> > some more precautions.
> > >> >
> > >> >
> > >> > Romain Manni-Bucau
> > >> > @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
> > >> >
> > >> >
> > >> > 2015-11-19 10:34 GMT-08:00 Raquel Pau Fernández <
> raquelpau@gmail.com
> > >:
> > >> >> Hi,
> > >> >>
> > >> >> Walkmod allows to use a formatter, but I think that the problems
> that
> > >> >> people find are as follows:
> > >> >>
> > >> >> - We don't want a big commit with all the source files reformatted.
> > >> >>
> > >> >> - We don't want to apply the formatter incrementally to avoid a set
> > of
> > >> >> commits just for formatting issues.
> > >> >>
> > >> >> In fact i have found the same problems in Guava. Google is not
> > >> following
> > >> >> its own formatter style.
> > >> >>
> > >> >> Let me know if I am wrong,
> > >> >>
> > >> >> Regards
> > >> >> El 19/11/2015 18:45, "cchacin" <cc...@gmail.com> escribió:
> > >> >>
> > >> >>> I use the  Google Style Guide
> > >> >>> <http://google.github.io/styleguide/javaguide.html>   (with some
> > >> >>> modification like 4 spaces) in this way:
> > >> >>>
> > >> >>> For Eclipse:
> > >> >>> You can configure the formatter with this file:
> > >> >>>
> > >> >>>
> > >> >
> > >>
> >
> https://github.com/google/styleguide/blob/gh-pages/eclipse-java-google-style.xml
> > >> >>>
> > >> >>> For IntelliJ:
> > >> >>> You can configure the formatter with this file
> > >> >>>
> > >> >>>
> > >> >
> > >>
> >
> https://github.com/google/styleguide/blob/gh-pages/intellij-java-google-style.xml
> > >> >>> Or use the eclipse formatter plugin
> > >> >>>
> > >> >>> For Netbeans: use the eclipse formatter plugin
> > >> >>>
> > >> >>> And there is a maven plugin
> > >> >>>
> > >> >>>
> > >> >
> > >>
> >
> https://maven-java-formatter-plugin.googlecode.com/svn/site/0.4/format-mojo.html
> > >> >>>
> > >> >>> One suggestion can be to use a pre-commit hook or a webhook in
> your
> > >> VCS,
> > >> > I
> > >> >>> never use walkmod before but probably we can configure a hook with
> > >> > walkmod
> > >> >>> also. I think the most important part is to have the common
> > >> configuration
> > >> >>> file wih the desired styles.
> > >> >>>
> > >> >>>
> > >> >>>
> > >> >>> -----
> > >> >>> Carlos Chacin
> > >> >>> http://github.com/cchacin
> > >> >>> --
> > >> >>> View this message in context:
> > >> >>>
> > >> >
> > >>
> >
> http://tomee-openejb.979440.n4.nabble.com/PMD-Formatting-tp4676866p4676884.html
> > >> >>> Sent from the TomEE Dev mailing list archive at Nabble.com.
> > >> >>>
> > >>
> > >
> >
> >
> > --
> > Raquel Pau
> >
> > *"Education is the most powerful weapon which you can use to change the
> > world**"*
> >
> > Nelson Mandela
> >
> > personal page:
> > http://sites.google.com/site/raquelpau/
> >
>



-- 
Raquel Pau

*"Education is the most powerful weapon which you can use to change the
world**"*

Nelson Mandela

personal page:
http://sites.google.com/site/raquelpau/

Re: PMD & Formatting

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi Raquel,

added walkmod.xml, apply is quite interesting and nice. We still need to
use win EOL for few files - discovered it thanks to your work!:

modified:
assembly/openejb-standalone/src/main/resources/service.readme.txt
modified:   tomee/apache-tomee/src/main/resources/service.readme.txt

But other ones uses unix one which is respected by walkmod :).


Execution on the whole master makes  INFO [main] - Total time: 59.304
seconds. I would be interested to get a maven integration (mvn package
would execute it by module and would make the build failing if something is
not respected but wouldnt apply anything by default). Is that something
existing?

@others: anyone else to test?



Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>

2015-11-27 17:21 GMT+01:00 Raquel Pau Fernández <ra...@gmail.com>:

> Hi,
>
> According the discussion, I have improved walkmod to allow the
> specification of the endline char according a platform.
>
> I have created a PR with the required configuration for walkmod. You juts
> need to download and execute the 2.1.0 version from walkmod.com.
>
> Here my PR:
> https://github.com/apache/tomee/pull/28
>
> Have a good weekend.
>
> 2015-11-19 21:36 GMT+01:00 Raquel Pau Fernández <ra...@gmail.com>:
>
> > ok! :-)
> > yes, walkmod allows to validate the results locally
> > El 19/11/2015 21:34, "Romain Manni-Bucau" <rm...@gmail.com>
> > escribió:
> >
> >> @Raquel: happy to have a go with walkmod while it matches the
> >> "validate locally" constraint
> >>
> >> Romain Manni-Bucau
> >> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
> >>
> >>
> >> 2015-11-19 12:24 GMT-08:00 Raquel Pau Fernández <ra...@gmail.com>:
> >> > Romain,
> >> >
> >> > Sorry, but I don't know the final conclusions, then :).Do you prefer
> to
> >> try
> >> > other tools first to just format or are you interested in adapting
> >> walkmod
> >> > to include your conventions?
> >> >
> >> > In the second case, I would try to find time for it because for my
> >> project,
> >> > this is an opportunity. Finally, just one thing to remind, walkmod
> would
> >> > allow not just to format conventions, but also any good programming
> >> > practices that you would to apply (eg. force final variables) without
> >> > reformatting ;)
> >> >
> >> > Please, let me know the final conclusions :)
> >> > Hi Raquel,
> >> >
> >> > kind of true. Said otherwise: re-formatting is most of the time
> >> > considered as noise so it should only be applied to the changed code
> >> > and not the code around or the files not modified at all and it should
> >> > be done before the commit IMO.
> >> >
> >> > Starting from scratch it means you can enforce rules easily with any
> >> > of the tools we spoke about but starting from a big codebase it needs
> >> > some more precautions.
> >> >
> >> >
> >> > Romain Manni-Bucau
> >> > @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
> >> >
> >> >
> >> > 2015-11-19 10:34 GMT-08:00 Raquel Pau Fernández <raquelpau@gmail.com
> >:
> >> >> Hi,
> >> >>
> >> >> Walkmod allows to use a formatter, but I think that the problems that
> >> >> people find are as follows:
> >> >>
> >> >> - We don't want a big commit with all the source files reformatted.
> >> >>
> >> >> - We don't want to apply the formatter incrementally to avoid a set
> of
> >> >> commits just for formatting issues.
> >> >>
> >> >> In fact i have found the same problems in Guava. Google is not
> >> following
> >> >> its own formatter style.
> >> >>
> >> >> Let me know if I am wrong,
> >> >>
> >> >> Regards
> >> >> El 19/11/2015 18:45, "cchacin" <cc...@gmail.com> escribió:
> >> >>
> >> >>> I use the  Google Style Guide
> >> >>> <http://google.github.io/styleguide/javaguide.html>   (with some
> >> >>> modification like 4 spaces) in this way:
> >> >>>
> >> >>> For Eclipse:
> >> >>> You can configure the formatter with this file:
> >> >>>
> >> >>>
> >> >
> >>
> https://github.com/google/styleguide/blob/gh-pages/eclipse-java-google-style.xml
> >> >>>
> >> >>> For IntelliJ:
> >> >>> You can configure the formatter with this file
> >> >>>
> >> >>>
> >> >
> >>
> https://github.com/google/styleguide/blob/gh-pages/intellij-java-google-style.xml
> >> >>> Or use the eclipse formatter plugin
> >> >>>
> >> >>> For Netbeans: use the eclipse formatter plugin
> >> >>>
> >> >>> And there is a maven plugin
> >> >>>
> >> >>>
> >> >
> >>
> https://maven-java-formatter-plugin.googlecode.com/svn/site/0.4/format-mojo.html
> >> >>>
> >> >>> One suggestion can be to use a pre-commit hook or a webhook in your
> >> VCS,
> >> > I
> >> >>> never use walkmod before but probably we can configure a hook with
> >> > walkmod
> >> >>> also. I think the most important part is to have the common
> >> configuration
> >> >>> file wih the desired styles.
> >> >>>
> >> >>>
> >> >>>
> >> >>> -----
> >> >>> Carlos Chacin
> >> >>> http://github.com/cchacin
> >> >>> --
> >> >>> View this message in context:
> >> >>>
> >> >
> >>
> http://tomee-openejb.979440.n4.nabble.com/PMD-Formatting-tp4676866p4676884.html
> >> >>> Sent from the TomEE Dev mailing list archive at Nabble.com.
> >> >>>
> >>
> >
>
>
> --
> Raquel Pau
>
> *"Education is the most powerful weapon which you can use to change the
> world**"*
>
> Nelson Mandela
>
> personal page:
> http://sites.google.com/site/raquelpau/
>

Re: PMD & Formatting

Posted by Raquel Pau Fernández <ra...@gmail.com>.
Hi,

According the discussion, I have improved walkmod to allow the
specification of the endline char according a platform.

I have created a PR with the required configuration for walkmod. You juts
need to download and execute the 2.1.0 version from walkmod.com.

Here my PR:
https://github.com/apache/tomee/pull/28

Have a good weekend.

2015-11-19 21:36 GMT+01:00 Raquel Pau Fernández <ra...@gmail.com>:

> ok! :-)
> yes, walkmod allows to validate the results locally
> El 19/11/2015 21:34, "Romain Manni-Bucau" <rm...@gmail.com>
> escribió:
>
>> @Raquel: happy to have a go with walkmod while it matches the
>> "validate locally" constraint
>>
>> Romain Manni-Bucau
>> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
>>
>>
>> 2015-11-19 12:24 GMT-08:00 Raquel Pau Fernández <ra...@gmail.com>:
>> > Romain,
>> >
>> > Sorry, but I don't know the final conclusions, then :).Do you prefer to
>> try
>> > other tools first to just format or are you interested in adapting
>> walkmod
>> > to include your conventions?
>> >
>> > In the second case, I would try to find time for it because for my
>> project,
>> > this is an opportunity. Finally, just one thing to remind, walkmod would
>> > allow not just to format conventions, but also any good programming
>> > practices that you would to apply (eg. force final variables) without
>> > reformatting ;)
>> >
>> > Please, let me know the final conclusions :)
>> > Hi Raquel,
>> >
>> > kind of true. Said otherwise: re-formatting is most of the time
>> > considered as noise so it should only be applied to the changed code
>> > and not the code around or the files not modified at all and it should
>> > be done before the commit IMO.
>> >
>> > Starting from scratch it means you can enforce rules easily with any
>> > of the tools we spoke about but starting from a big codebase it needs
>> > some more precautions.
>> >
>> >
>> > Romain Manni-Bucau
>> > @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
>> >
>> >
>> > 2015-11-19 10:34 GMT-08:00 Raquel Pau Fernández <ra...@gmail.com>:
>> >> Hi,
>> >>
>> >> Walkmod allows to use a formatter, but I think that the problems that
>> >> people find are as follows:
>> >>
>> >> - We don't want a big commit with all the source files reformatted.
>> >>
>> >> - We don't want to apply the formatter incrementally to avoid a set of
>> >> commits just for formatting issues.
>> >>
>> >> In fact i have found the same problems in Guava. Google is not
>> following
>> >> its own formatter style.
>> >>
>> >> Let me know if I am wrong,
>> >>
>> >> Regards
>> >> El 19/11/2015 18:45, "cchacin" <cc...@gmail.com> escribió:
>> >>
>> >>> I use the  Google Style Guide
>> >>> <http://google.github.io/styleguide/javaguide.html>   (with some
>> >>> modification like 4 spaces) in this way:
>> >>>
>> >>> For Eclipse:
>> >>> You can configure the formatter with this file:
>> >>>
>> >>>
>> >
>> https://github.com/google/styleguide/blob/gh-pages/eclipse-java-google-style.xml
>> >>>
>> >>> For IntelliJ:
>> >>> You can configure the formatter with this file
>> >>>
>> >>>
>> >
>> https://github.com/google/styleguide/blob/gh-pages/intellij-java-google-style.xml
>> >>> Or use the eclipse formatter plugin
>> >>>
>> >>> For Netbeans: use the eclipse formatter plugin
>> >>>
>> >>> And there is a maven plugin
>> >>>
>> >>>
>> >
>> https://maven-java-formatter-plugin.googlecode.com/svn/site/0.4/format-mojo.html
>> >>>
>> >>> One suggestion can be to use a pre-commit hook or a webhook in your
>> VCS,
>> > I
>> >>> never use walkmod before but probably we can configure a hook with
>> > walkmod
>> >>> also. I think the most important part is to have the common
>> configuration
>> >>> file wih the desired styles.
>> >>>
>> >>>
>> >>>
>> >>> -----
>> >>> Carlos Chacin
>> >>> http://github.com/cchacin
>> >>> --
>> >>> View this message in context:
>> >>>
>> >
>> http://tomee-openejb.979440.n4.nabble.com/PMD-Formatting-tp4676866p4676884.html
>> >>> Sent from the TomEE Dev mailing list archive at Nabble.com.
>> >>>
>>
>


-- 
Raquel Pau

*"Education is the most powerful weapon which you can use to change the
world**"*

Nelson Mandela

personal page:
http://sites.google.com/site/raquelpau/

Re: PMD & Formatting

Posted by Raquel Pau Fernández <ra...@gmail.com>.
ok! :-)
yes, walkmod allows to validate the results locally
El 19/11/2015 21:34, "Romain Manni-Bucau" <rm...@gmail.com> escribió:

> @Raquel: happy to have a go with walkmod while it matches the
> "validate locally" constraint
>
> Romain Manni-Bucau
> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
>
>
> 2015-11-19 12:24 GMT-08:00 Raquel Pau Fernández <ra...@gmail.com>:
> > Romain,
> >
> > Sorry, but I don't know the final conclusions, then :).Do you prefer to
> try
> > other tools first to just format or are you interested in adapting
> walkmod
> > to include your conventions?
> >
> > In the second case, I would try to find time for it because for my
> project,
> > this is an opportunity. Finally, just one thing to remind, walkmod would
> > allow not just to format conventions, but also any good programming
> > practices that you would to apply (eg. force final variables) without
> > reformatting ;)
> >
> > Please, let me know the final conclusions :)
> > Hi Raquel,
> >
> > kind of true. Said otherwise: re-formatting is most of the time
> > considered as noise so it should only be applied to the changed code
> > and not the code around or the files not modified at all and it should
> > be done before the commit IMO.
> >
> > Starting from scratch it means you can enforce rules easily with any
> > of the tools we spoke about but starting from a big codebase it needs
> > some more precautions.
> >
> >
> > Romain Manni-Bucau
> > @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
> >
> >
> > 2015-11-19 10:34 GMT-08:00 Raquel Pau Fernández <ra...@gmail.com>:
> >> Hi,
> >>
> >> Walkmod allows to use a formatter, but I think that the problems that
> >> people find are as follows:
> >>
> >> - We don't want a big commit with all the source files reformatted.
> >>
> >> - We don't want to apply the formatter incrementally to avoid a set of
> >> commits just for formatting issues.
> >>
> >> In fact i have found the same problems in Guava. Google is not following
> >> its own formatter style.
> >>
> >> Let me know if I am wrong,
> >>
> >> Regards
> >> El 19/11/2015 18:45, "cchacin" <cc...@gmail.com> escribió:
> >>
> >>> I use the  Google Style Guide
> >>> <http://google.github.io/styleguide/javaguide.html>   (with some
> >>> modification like 4 spaces) in this way:
> >>>
> >>> For Eclipse:
> >>> You can configure the formatter with this file:
> >>>
> >>>
> >
> https://github.com/google/styleguide/blob/gh-pages/eclipse-java-google-style.xml
> >>>
> >>> For IntelliJ:
> >>> You can configure the formatter with this file
> >>>
> >>>
> >
> https://github.com/google/styleguide/blob/gh-pages/intellij-java-google-style.xml
> >>> Or use the eclipse formatter plugin
> >>>
> >>> For Netbeans: use the eclipse formatter plugin
> >>>
> >>> And there is a maven plugin
> >>>
> >>>
> >
> https://maven-java-formatter-plugin.googlecode.com/svn/site/0.4/format-mojo.html
> >>>
> >>> One suggestion can be to use a pre-commit hook or a webhook in your
> VCS,
> > I
> >>> never use walkmod before but probably we can configure a hook with
> > walkmod
> >>> also. I think the most important part is to have the common
> configuration
> >>> file wih the desired styles.
> >>>
> >>>
> >>>
> >>> -----
> >>> Carlos Chacin
> >>> http://github.com/cchacin
> >>> --
> >>> View this message in context:
> >>>
> >
> http://tomee-openejb.979440.n4.nabble.com/PMD-Formatting-tp4676866p4676884.html
> >>> Sent from the TomEE Dev mailing list archive at Nabble.com.
> >>>
>

Re: PMD & Formatting

Posted by Romain Manni-Bucau <rm...@gmail.com>.
@Raquel: happy to have a go with walkmod while it matches the
"validate locally" constraint

Romain Manni-Bucau
@rmannibucau |  Blog | Github | LinkedIn | Tomitriber


2015-11-19 12:24 GMT-08:00 Raquel Pau Fernández <ra...@gmail.com>:
> Romain,
>
> Sorry, but I don't know the final conclusions, then :).Do you prefer to try
> other tools first to just format or are you interested in adapting walkmod
> to include your conventions?
>
> In the second case, I would try to find time for it because for my project,
> this is an opportunity. Finally, just one thing to remind, walkmod would
> allow not just to format conventions, but also any good programming
> practices that you would to apply (eg. force final variables) without
> reformatting ;)
>
> Please, let me know the final conclusions :)
> Hi Raquel,
>
> kind of true. Said otherwise: re-formatting is most of the time
> considered as noise so it should only be applied to the changed code
> and not the code around or the files not modified at all and it should
> be done before the commit IMO.
>
> Starting from scratch it means you can enforce rules easily with any
> of the tools we spoke about but starting from a big codebase it needs
> some more precautions.
>
>
> Romain Manni-Bucau
> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
>
>
> 2015-11-19 10:34 GMT-08:00 Raquel Pau Fernández <ra...@gmail.com>:
>> Hi,
>>
>> Walkmod allows to use a formatter, but I think that the problems that
>> people find are as follows:
>>
>> - We don't want a big commit with all the source files reformatted.
>>
>> - We don't want to apply the formatter incrementally to avoid a set of
>> commits just for formatting issues.
>>
>> In fact i have found the same problems in Guava. Google is not following
>> its own formatter style.
>>
>> Let me know if I am wrong,
>>
>> Regards
>> El 19/11/2015 18:45, "cchacin" <cc...@gmail.com> escribió:
>>
>>> I use the  Google Style Guide
>>> <http://google.github.io/styleguide/javaguide.html>   (with some
>>> modification like 4 spaces) in this way:
>>>
>>> For Eclipse:
>>> You can configure the formatter with this file:
>>>
>>>
> https://github.com/google/styleguide/blob/gh-pages/eclipse-java-google-style.xml
>>>
>>> For IntelliJ:
>>> You can configure the formatter with this file
>>>
>>>
> https://github.com/google/styleguide/blob/gh-pages/intellij-java-google-style.xml
>>> Or use the eclipse formatter plugin
>>>
>>> For Netbeans: use the eclipse formatter plugin
>>>
>>> And there is a maven plugin
>>>
>>>
> https://maven-java-formatter-plugin.googlecode.com/svn/site/0.4/format-mojo.html
>>>
>>> One suggestion can be to use a pre-commit hook or a webhook in your VCS,
> I
>>> never use walkmod before but probably we can configure a hook with
> walkmod
>>> also. I think the most important part is to have the common configuration
>>> file wih the desired styles.
>>>
>>>
>>>
>>> -----
>>> Carlos Chacin
>>> http://github.com/cchacin
>>> --
>>> View this message in context:
>>>
> http://tomee-openejb.979440.n4.nabble.com/PMD-Formatting-tp4676866p4676884.html
>>> Sent from the TomEE Dev mailing list archive at Nabble.com.
>>>

Re: PMD & Formatting

Posted by Raquel Pau Fernández <ra...@gmail.com>.
Romain,

Sorry, but I don't know the final conclusions, then :).Do you prefer to try
other tools first to just format or are you interested in adapting walkmod
to include your conventions?

In the second case, I would try to find time for it because for my project,
this is an opportunity. Finally, just one thing to remind, walkmod would
allow not just to format conventions, but also any good programming
practices that you would to apply (eg. force final variables) without
reformatting ;)

Please, let me know the final conclusions :)
Hi Raquel,

kind of true. Said otherwise: re-formatting is most of the time
considered as noise so it should only be applied to the changed code
and not the code around or the files not modified at all and it should
be done before the commit IMO.

Starting from scratch it means you can enforce rules easily with any
of the tools we spoke about but starting from a big codebase it needs
some more precautions.


Romain Manni-Bucau
@rmannibucau |  Blog | Github | LinkedIn | Tomitriber


2015-11-19 10:34 GMT-08:00 Raquel Pau Fernández <ra...@gmail.com>:
> Hi,
>
> Walkmod allows to use a formatter, but I think that the problems that
> people find are as follows:
>
> - We don't want a big commit with all the source files reformatted.
>
> - We don't want to apply the formatter incrementally to avoid a set of
> commits just for formatting issues.
>
> In fact i have found the same problems in Guava. Google is not following
> its own formatter style.
>
> Let me know if I am wrong,
>
> Regards
> El 19/11/2015 18:45, "cchacin" <cc...@gmail.com> escribió:
>
>> I use the  Google Style Guide
>> <http://google.github.io/styleguide/javaguide.html>   (with some
>> modification like 4 spaces) in this way:
>>
>> For Eclipse:
>> You can configure the formatter with this file:
>>
>>
https://github.com/google/styleguide/blob/gh-pages/eclipse-java-google-style.xml
>>
>> For IntelliJ:
>> You can configure the formatter with this file
>>
>>
https://github.com/google/styleguide/blob/gh-pages/intellij-java-google-style.xml
>> Or use the eclipse formatter plugin
>>
>> For Netbeans: use the eclipse formatter plugin
>>
>> And there is a maven plugin
>>
>>
https://maven-java-formatter-plugin.googlecode.com/svn/site/0.4/format-mojo.html
>>
>> One suggestion can be to use a pre-commit hook or a webhook in your VCS,
I
>> never use walkmod before but probably we can configure a hook with
walkmod
>> also. I think the most important part is to have the common configuration
>> file wih the desired styles.
>>
>>
>>
>> -----
>> Carlos Chacin
>> http://github.com/cchacin
>> --
>> View this message in context:
>>
http://tomee-openejb.979440.n4.nabble.com/PMD-Formatting-tp4676866p4676884.html
>> Sent from the TomEE Dev mailing list archive at Nabble.com.
>>

Re: PMD & Formatting

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi Raquel,

kind of true. Said otherwise: re-formatting is most of the time
considered as noise so it should only be applied to the changed code
and not the code around or the files not modified at all and it should
be done before the commit IMO.

Starting from scratch it means you can enforce rules easily with any
of the tools we spoke about but starting from a big codebase it needs
some more precautions.


Romain Manni-Bucau
@rmannibucau |  Blog | Github | LinkedIn | Tomitriber


2015-11-19 10:34 GMT-08:00 Raquel Pau Fernández <ra...@gmail.com>:
> Hi,
>
> Walkmod allows to use a formatter, but I think that the problems that
> people find are as follows:
>
> - We don't want a big commit with all the source files reformatted.
>
> - We don't want to apply the formatter incrementally to avoid a set of
> commits just for formatting issues.
>
> In fact i have found the same problems in Guava. Google is not following
> its own formatter style.
>
> Let me know if I am wrong,
>
> Regards
> El 19/11/2015 18:45, "cchacin" <cc...@gmail.com> escribió:
>
>> I use the  Google Style Guide
>> <http://google.github.io/styleguide/javaguide.html>   (with some
>> modification like 4 spaces) in this way:
>>
>> For Eclipse:
>> You can configure the formatter with this file:
>>
>> https://github.com/google/styleguide/blob/gh-pages/eclipse-java-google-style.xml
>>
>> For IntelliJ:
>> You can configure the formatter with this file
>>
>> https://github.com/google/styleguide/blob/gh-pages/intellij-java-google-style.xml
>> Or use the eclipse formatter plugin
>>
>> For Netbeans: use the eclipse formatter plugin
>>
>> And there is a maven plugin
>>
>> https://maven-java-formatter-plugin.googlecode.com/svn/site/0.4/format-mojo.html
>>
>> One suggestion can be to use a pre-commit hook or a webhook in your VCS, I
>> never use walkmod before but probably we can configure a hook with walkmod
>> also. I think the most important part is to have the common configuration
>> file wih the desired styles.
>>
>>
>>
>> -----
>> Carlos Chacin
>> http://github.com/cchacin
>> --
>> View this message in context:
>> http://tomee-openejb.979440.n4.nabble.com/PMD-Formatting-tp4676866p4676884.html
>> Sent from the TomEE Dev mailing list archive at Nabble.com.
>>

Re: PMD & Formatting

Posted by Raquel Pau Fernández <ra...@gmail.com>.
Hi,

Walkmod allows to use a formatter, but I think that the problems that
people find are as follows:

- We don't want a big commit with all the source files reformatted.

- We don't want to apply the formatter incrementally to avoid a set of
commits just for formatting issues.

In fact i have found the same problems in Guava. Google is not following
its own formatter style.

Let me know if I am wrong,

Regards
El 19/11/2015 18:45, "cchacin" <cc...@gmail.com> escribió:

> I use the  Google Style Guide
> <http://google.github.io/styleguide/javaguide.html>   (with some
> modification like 4 spaces) in this way:
>
> For Eclipse:
> You can configure the formatter with this file:
>
> https://github.com/google/styleguide/blob/gh-pages/eclipse-java-google-style.xml
>
> For IntelliJ:
> You can configure the formatter with this file
>
> https://github.com/google/styleguide/blob/gh-pages/intellij-java-google-style.xml
> Or use the eclipse formatter plugin
>
> For Netbeans: use the eclipse formatter plugin
>
> And there is a maven plugin
>
> https://maven-java-formatter-plugin.googlecode.com/svn/site/0.4/format-mojo.html
>
> One suggestion can be to use a pre-commit hook or a webhook in your VCS, I
> never use walkmod before but probably we can configure a hook with walkmod
> also. I think the most important part is to have the common configuration
> file wih the desired styles.
>
>
>
> -----
> Carlos Chacin
> http://github.com/cchacin
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/PMD-Formatting-tp4676866p4676884.html
> Sent from the TomEE Dev mailing list archive at Nabble.com.
>

Re: PMD & Formatting

Posted by Romain Manni-Bucau <rm...@gmail.com>.
2015-11-19 9:29 GMT-08:00 cchacin <cc...@gmail.com>:
> I use the  Google Style Guide
> <http://google.github.io/styleguide/javaguide.html>   (with some
> modification like 4 spaces) in this way:
>

we have a style:
https://github.com/apache/tomee/blob/master/src/main/style/checkstyle.xml
... ok ok it is light but I guess it matches the will of most of us (+
historical changesets) so can't be too rigid.

> For Eclipse:
> You can configure the formatter with this file:
> https://github.com/google/styleguide/blob/gh-pages/eclipse-java-google-style.xml
>
> For IntelliJ:
> You can configure the formatter with this file
> https://github.com/google/styleguide/blob/gh-pages/intellij-java-google-style.xml
> Or use the eclipse formatter plugin
>
> For Netbeans: use the eclipse formatter plugin
>
> And there is a maven plugin
> https://maven-java-formatter-plugin.googlecode.com/svn/site/0.4/format-mojo.html
>
> One suggestion can be to use a pre-commit hook or a webhook in your VCS, I
> never use walkmod before but probably we can configure a hook with walkmod
> also. I think the most important part is to have the common configuration
> file wih the desired styles.
>

Pitfall there can be you still create conflicts since the pushed code
is not the one you have, maybe better to just rely on a local plugin
preventing the build.

wdyt?

>
>
> -----
> Carlos Chacin
> http://github.com/cchacin
> --
> View this message in context: http://tomee-openejb.979440.n4.nabble.com/PMD-Formatting-tp4676866p4676884.html
> Sent from the TomEE Dev mailing list archive at Nabble.com.

Re: PMD & Formatting

Posted by cchacin <cc...@gmail.com>.
I use the  Google Style Guide
<http://google.github.io/styleguide/javaguide.html>   (with some
modification like 4 spaces) in this way:

For Eclipse: 
You can configure the formatter with this file:
https://github.com/google/styleguide/blob/gh-pages/eclipse-java-google-style.xml

For IntelliJ:
You can configure the formatter with this file
https://github.com/google/styleguide/blob/gh-pages/intellij-java-google-style.xml
Or use the eclipse formatter plugin

For Netbeans: use the eclipse formatter plugin

And there is a maven plugin
https://maven-java-formatter-plugin.googlecode.com/svn/site/0.4/format-mojo.html

One suggestion can be to use a pre-commit hook or a webhook in your VCS, I
never use walkmod before but probably we can configure a hook with walkmod
also. I think the most important part is to have the common configuration
file wih the desired styles.



-----
Carlos Chacin
http://github.com/cchacin
--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/PMD-Formatting-tp4676866p4676884.html
Sent from the TomEE Dev mailing list archive at Nabble.com.

Re: PMD & Formatting

Posted by Romain Manni-Bucau <rm...@gmail.com>.
sounds good, if it can be done by module - dont know if there is a
maven plugin for that - it sounds great.

Romain Manni-Bucau
@rmannibucau |  Blog | Github | LinkedIn | Tomitriber


2015-11-19 8:47 GMT-08:00 Raquel Pau Fernández <ra...@gmail.com>:
> Hi,
>
> The execution time depends on the transformations you want to apply. In the
> guava example, walkmod is compiling source code, applying semantic analysis
> and removing dead code. If you just want to correct formatting issues, it
> will really become faster.
>
> If you don't want such history, you need to run walkmod locally selecting
> the hole project, a module or a set of files (your modified files).
>
>
>
>
> 2015-11-19 17:37 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:
>
>> 2015-11-19 8:23 GMT-08:00 Raquel Pau Fernández <ra...@gmail.com>:
>> > Test for Tomme:
>> >
>> > I can do it during the next week an adaptation of the source code to
>> > provide an option to force an specific End Line and execute it for the
>> > entire project and send a PR. However, Walkmod assumes that at least
>> there
>> > is one code transformation (not pure formatting). So, if this is the
>> > scenario I need to adapt more parts. However, confirm this is what you
>> want
>> > :)
>> >
>> > Regarding the execution time:
>> >
>> > I have run walkmod on guava core, for example: 52 sec for 473 files.
>> > However, it does not require to be executed for all the source code, you
>> > can select the subset of files you want to process. Moreover, there is a
>> > free service online (because it is beta) to process the pushed files and
>> > send a PR if it is needed.
>> >
>>
>> for just the .java we have 5327 files so if linear it would make ~10mn
>> which is quite a lot for a local run which would be nice to avoid
>> formatting commits - I guess it is one of the goals of such a work.
>>
>> If we split in "modules" the execution, one module we touch a lot has
>> 1534 files (openejb-core) so would still add 3mn to the build which is
>> probably too much. Any way to make it insanely fast if we select only
>> few validations/corrections?
>>
>> Personally I'd like to be able to integrate the diff before pushing to
>> avoid an history like:
>>
>> [EOL]
>> [formatting]
>> [adding test]
>> [fixing test]
>> [formatting]
>> [another cool feature]
>> [formatting]
>> [awesome feature #1]
>>
>>
>> Does walkmod can do it and would it stay free for such a usage?
>>
>> For EOL I know checkstyle can validate it and ant (antrun plugin?) can
>> fix it in place. It just tackles a small part of the formatting but it
>> is the one the most intrusive ATM it seems.
>>
>>
>> > Any feedback is appreaciated
>> >
>> >
>> > 2015-11-19 17:12 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:
>> >
>> >> Is it hard - in term of time - to get an estimation of the changes it
>> >> would imply and get a kind of preview/diff? Anyone able to work on it?
>> >> I can help a bit next week if needed.
>> >>
>> >> Romain Manni-Bucau
>> >> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
>> >>
>> >>
>> >> 2015-11-19 8:09 GMT-08:00 Raquel Pau Fernández <ra...@gmail.com>:
>> >> > Hi,
>> >> >
>> >> > I am the project lead of Walkmod. I would like to add to Alex comments
>> >> that
>> >> > another important feature is that it allows just to apply your code
>> >> > conventions without rewriting the hole code base according an specific
>> >> > formatter. Consequently, its executions do not need to reformat all
>> your
>> >> > code. It just removes or add those pieces of code in the appropiate
>> gap
>> >> > without rewriting all your source code. E.g. if you want to ensure
>> that
>> >> > there is no dead code or apply an specific license.
>> >> >
>> >> > It also respects the Line End of each source file but, if you want I
>> can
>> >> > work on adapting it to ensure an specific Line End.
>> >> >
>> >> >
>> >> > 2015-11-19 16:36 GMT+01:00 Alex Soto <as...@gmail.com>:
>> >> >
>> >> >> The good thing about Walkmod is that you don't relay on IDE
>> >> configuration,
>> >> >> it is a separated process that can generate a PR with the changes so
>> all
>> >> >> code is uniform.
>> >> >>
>> >> >> El dj., 19 nov. 2015 a les 16:35, Andy Gumbrecht (<
>> >> >> agumbrecht@tomitribe.com>)
>> >> >> va escriure:
>> >> >>
>> >> >> > +1 on anything that promotes a globally uniform format.
>> >> >> >
>> >> >> > Still need the IDEA settings import/export to match whatever is
>> >> >> configured.
>> >> >> >
>> >> >> > Someone on unix box will have to ensure everything is LF except
>> maybe
>> >> >> > *.bat & *.cmd <- Not sure how to handle that, but can be done in
>> >> >> > .gitattributes I think?
>> >> >> >
>> >> >> > --
>> >> >> >    Andy Gumbrecht
>> >> >> >    https://twitter.com/AndyGeeDe
>> >> >> >    http://www.tomitribe.com
>> >> >> >
>> >> >> >
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > Raquel Pau
>> >> >
>> >> > *"Education is the most powerful weapon which you can use to change
>> the
>> >> > world**"*
>> >> >
>> >> > Nelson Mandela
>> >> >
>> >> > personal page:
>> >> > http://sites.google.com/site/raquelpau/
>> >>
>> >
>> >
>> >
>> > --
>> > Raquel Pau
>> >
>> > *"Education is the most powerful weapon which you can use to change the
>> > world**"*
>> >
>> > Nelson Mandela
>> >
>> > personal page:
>> > http://sites.google.com/site/raquelpau/
>>
>
>
>
> --
> Raquel Pau
>
> *"Education is the most powerful weapon which you can use to change the
> world**"*
>
> Nelson Mandela
>
> personal page:
> http://sites.google.com/site/raquelpau/

Re: PMD & Formatting

Posted by Raquel Pau Fernández <ra...@gmail.com>.
Hi,

The execution time depends on the transformations you want to apply. In the
guava example, walkmod is compiling source code, applying semantic analysis
and removing dead code. If you just want to correct formatting issues, it
will really become faster.

If you don't want such history, you need to run walkmod locally selecting
the hole project, a module or a set of files (your modified files).




2015-11-19 17:37 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:

> 2015-11-19 8:23 GMT-08:00 Raquel Pau Fernández <ra...@gmail.com>:
> > Test for Tomme:
> >
> > I can do it during the next week an adaptation of the source code to
> > provide an option to force an specific End Line and execute it for the
> > entire project and send a PR. However, Walkmod assumes that at least
> there
> > is one code transformation (not pure formatting). So, if this is the
> > scenario I need to adapt more parts. However, confirm this is what you
> want
> > :)
> >
> > Regarding the execution time:
> >
> > I have run walkmod on guava core, for example: 52 sec for 473 files.
> > However, it does not require to be executed for all the source code, you
> > can select the subset of files you want to process. Moreover, there is a
> > free service online (because it is beta) to process the pushed files and
> > send a PR if it is needed.
> >
>
> for just the .java we have 5327 files so if linear it would make ~10mn
> which is quite a lot for a local run which would be nice to avoid
> formatting commits - I guess it is one of the goals of such a work.
>
> If we split in "modules" the execution, one module we touch a lot has
> 1534 files (openejb-core) so would still add 3mn to the build which is
> probably too much. Any way to make it insanely fast if we select only
> few validations/corrections?
>
> Personally I'd like to be able to integrate the diff before pushing to
> avoid an history like:
>
> [EOL]
> [formatting]
> [adding test]
> [fixing test]
> [formatting]
> [another cool feature]
> [formatting]
> [awesome feature #1]
>
>
> Does walkmod can do it and would it stay free for such a usage?
>
> For EOL I know checkstyle can validate it and ant (antrun plugin?) can
> fix it in place. It just tackles a small part of the formatting but it
> is the one the most intrusive ATM it seems.
>
>
> > Any feedback is appreaciated
> >
> >
> > 2015-11-19 17:12 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:
> >
> >> Is it hard - in term of time - to get an estimation of the changes it
> >> would imply and get a kind of preview/diff? Anyone able to work on it?
> >> I can help a bit next week if needed.
> >>
> >> Romain Manni-Bucau
> >> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
> >>
> >>
> >> 2015-11-19 8:09 GMT-08:00 Raquel Pau Fernández <ra...@gmail.com>:
> >> > Hi,
> >> >
> >> > I am the project lead of Walkmod. I would like to add to Alex comments
> >> that
> >> > another important feature is that it allows just to apply your code
> >> > conventions without rewriting the hole code base according an specific
> >> > formatter. Consequently, its executions do not need to reformat all
> your
> >> > code. It just removes or add those pieces of code in the appropiate
> gap
> >> > without rewriting all your source code. E.g. if you want to ensure
> that
> >> > there is no dead code or apply an specific license.
> >> >
> >> > It also respects the Line End of each source file but, if you want I
> can
> >> > work on adapting it to ensure an specific Line End.
> >> >
> >> >
> >> > 2015-11-19 16:36 GMT+01:00 Alex Soto <as...@gmail.com>:
> >> >
> >> >> The good thing about Walkmod is that you don't relay on IDE
> >> configuration,
> >> >> it is a separated process that can generate a PR with the changes so
> all
> >> >> code is uniform.
> >> >>
> >> >> El dj., 19 nov. 2015 a les 16:35, Andy Gumbrecht (<
> >> >> agumbrecht@tomitribe.com>)
> >> >> va escriure:
> >> >>
> >> >> > +1 on anything that promotes a globally uniform format.
> >> >> >
> >> >> > Still need the IDEA settings import/export to match whatever is
> >> >> configured.
> >> >> >
> >> >> > Someone on unix box will have to ensure everything is LF except
> maybe
> >> >> > *.bat & *.cmd <- Not sure how to handle that, but can be done in
> >> >> > .gitattributes I think?
> >> >> >
> >> >> > --
> >> >> >    Andy Gumbrecht
> >> >> >    https://twitter.com/AndyGeeDe
> >> >> >    http://www.tomitribe.com
> >> >> >
> >> >> >
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > Raquel Pau
> >> >
> >> > *"Education is the most powerful weapon which you can use to change
> the
> >> > world**"*
> >> >
> >> > Nelson Mandela
> >> >
> >> > personal page:
> >> > http://sites.google.com/site/raquelpau/
> >>
> >
> >
> >
> > --
> > Raquel Pau
> >
> > *"Education is the most powerful weapon which you can use to change the
> > world**"*
> >
> > Nelson Mandela
> >
> > personal page:
> > http://sites.google.com/site/raquelpau/
>



-- 
Raquel Pau

*"Education is the most powerful weapon which you can use to change the
world**"*

Nelson Mandela

personal page:
http://sites.google.com/site/raquelpau/

Re: PMD & Formatting

Posted by Romain Manni-Bucau <rm...@gmail.com>.
2015-11-19 8:23 GMT-08:00 Raquel Pau Fernández <ra...@gmail.com>:
> Test for Tomme:
>
> I can do it during the next week an adaptation of the source code to
> provide an option to force an specific End Line and execute it for the
> entire project and send a PR. However, Walkmod assumes that at least there
> is one code transformation (not pure formatting). So, if this is the
> scenario I need to adapt more parts. However, confirm this is what you want
> :)
>
> Regarding the execution time:
>
> I have run walkmod on guava core, for example: 52 sec for 473 files.
> However, it does not require to be executed for all the source code, you
> can select the subset of files you want to process. Moreover, there is a
> free service online (because it is beta) to process the pushed files and
> send a PR if it is needed.
>

for just the .java we have 5327 files so if linear it would make ~10mn
which is quite a lot for a local run which would be nice to avoid
formatting commits - I guess it is one of the goals of such a work.

If we split in "modules" the execution, one module we touch a lot has
1534 files (openejb-core) so would still add 3mn to the build which is
probably too much. Any way to make it insanely fast if we select only
few validations/corrections?

Personally I'd like to be able to integrate the diff before pushing to
avoid an history like:

[EOL]
[formatting]
[adding test]
[fixing test]
[formatting]
[another cool feature]
[formatting]
[awesome feature #1]


Does walkmod can do it and would it stay free for such a usage?

For EOL I know checkstyle can validate it and ant (antrun plugin?) can
fix it in place. It just tackles a small part of the formatting but it
is the one the most intrusive ATM it seems.


> Any feedback is appreaciated
>
>
> 2015-11-19 17:12 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:
>
>> Is it hard - in term of time - to get an estimation of the changes it
>> would imply and get a kind of preview/diff? Anyone able to work on it?
>> I can help a bit next week if needed.
>>
>> Romain Manni-Bucau
>> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
>>
>>
>> 2015-11-19 8:09 GMT-08:00 Raquel Pau Fernández <ra...@gmail.com>:
>> > Hi,
>> >
>> > I am the project lead of Walkmod. I would like to add to Alex comments
>> that
>> > another important feature is that it allows just to apply your code
>> > conventions without rewriting the hole code base according an specific
>> > formatter. Consequently, its executions do not need to reformat all your
>> > code. It just removes or add those pieces of code in the appropiate gap
>> > without rewriting all your source code. E.g. if you want to ensure that
>> > there is no dead code or apply an specific license.
>> >
>> > It also respects the Line End of each source file but, if you want I can
>> > work on adapting it to ensure an specific Line End.
>> >
>> >
>> > 2015-11-19 16:36 GMT+01:00 Alex Soto <as...@gmail.com>:
>> >
>> >> The good thing about Walkmod is that you don't relay on IDE
>> configuration,
>> >> it is a separated process that can generate a PR with the changes so all
>> >> code is uniform.
>> >>
>> >> El dj., 19 nov. 2015 a les 16:35, Andy Gumbrecht (<
>> >> agumbrecht@tomitribe.com>)
>> >> va escriure:
>> >>
>> >> > +1 on anything that promotes a globally uniform format.
>> >> >
>> >> > Still need the IDEA settings import/export to match whatever is
>> >> configured.
>> >> >
>> >> > Someone on unix box will have to ensure everything is LF except maybe
>> >> > *.bat & *.cmd <- Not sure how to handle that, but can be done in
>> >> > .gitattributes I think?
>> >> >
>> >> > --
>> >> >    Andy Gumbrecht
>> >> >    https://twitter.com/AndyGeeDe
>> >> >    http://www.tomitribe.com
>> >> >
>> >> >
>> >>
>> >
>> >
>> >
>> > --
>> > Raquel Pau
>> >
>> > *"Education is the most powerful weapon which you can use to change the
>> > world**"*
>> >
>> > Nelson Mandela
>> >
>> > personal page:
>> > http://sites.google.com/site/raquelpau/
>>
>
>
>
> --
> Raquel Pau
>
> *"Education is the most powerful weapon which you can use to change the
> world**"*
>
> Nelson Mandela
>
> personal page:
> http://sites.google.com/site/raquelpau/

Re: PMD & Formatting

Posted by Raquel Pau Fernández <ra...@gmail.com>.
Test for Tomme:

I can do it during the next week an adaptation of the source code to
provide an option to force an specific End Line and execute it for the
entire project and send a PR. However, Walkmod assumes that at least there
is one code transformation (not pure formatting). So, if this is the
scenario I need to adapt more parts. However, confirm this is what you want
:)

Regarding the execution time:

I have run walkmod on guava core, for example: 52 sec for 473 files.
However, it does not require to be executed for all the source code, you
can select the subset of files you want to process. Moreover, there is a
free service online (because it is beta) to process the pushed files and
send a PR if it is needed.

Any feedback is appreaciated


2015-11-19 17:12 GMT+01:00 Romain Manni-Bucau <rm...@gmail.com>:

> Is it hard - in term of time - to get an estimation of the changes it
> would imply and get a kind of preview/diff? Anyone able to work on it?
> I can help a bit next week if needed.
>
> Romain Manni-Bucau
> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
>
>
> 2015-11-19 8:09 GMT-08:00 Raquel Pau Fernández <ra...@gmail.com>:
> > Hi,
> >
> > I am the project lead of Walkmod. I would like to add to Alex comments
> that
> > another important feature is that it allows just to apply your code
> > conventions without rewriting the hole code base according an specific
> > formatter. Consequently, its executions do not need to reformat all your
> > code. It just removes or add those pieces of code in the appropiate gap
> > without rewriting all your source code. E.g. if you want to ensure that
> > there is no dead code or apply an specific license.
> >
> > It also respects the Line End of each source file but, if you want I can
> > work on adapting it to ensure an specific Line End.
> >
> >
> > 2015-11-19 16:36 GMT+01:00 Alex Soto <as...@gmail.com>:
> >
> >> The good thing about Walkmod is that you don't relay on IDE
> configuration,
> >> it is a separated process that can generate a PR with the changes so all
> >> code is uniform.
> >>
> >> El dj., 19 nov. 2015 a les 16:35, Andy Gumbrecht (<
> >> agumbrecht@tomitribe.com>)
> >> va escriure:
> >>
> >> > +1 on anything that promotes a globally uniform format.
> >> >
> >> > Still need the IDEA settings import/export to match whatever is
> >> configured.
> >> >
> >> > Someone on unix box will have to ensure everything is LF except maybe
> >> > *.bat & *.cmd <- Not sure how to handle that, but can be done in
> >> > .gitattributes I think?
> >> >
> >> > --
> >> >    Andy Gumbrecht
> >> >    https://twitter.com/AndyGeeDe
> >> >    http://www.tomitribe.com
> >> >
> >> >
> >>
> >
> >
> >
> > --
> > Raquel Pau
> >
> > *"Education is the most powerful weapon which you can use to change the
> > world**"*
> >
> > Nelson Mandela
> >
> > personal page:
> > http://sites.google.com/site/raquelpau/
>



-- 
Raquel Pau

*"Education is the most powerful weapon which you can use to change the
world**"*

Nelson Mandela

personal page:
http://sites.google.com/site/raquelpau/

Re: PMD & Formatting

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Is it hard - in term of time - to get an estimation of the changes it
would imply and get a kind of preview/diff? Anyone able to work on it?
I can help a bit next week if needed.

Romain Manni-Bucau
@rmannibucau |  Blog | Github | LinkedIn | Tomitriber


2015-11-19 8:09 GMT-08:00 Raquel Pau Fernández <ra...@gmail.com>:
> Hi,
>
> I am the project lead of Walkmod. I would like to add to Alex comments that
> another important feature is that it allows just to apply your code
> conventions without rewriting the hole code base according an specific
> formatter. Consequently, its executions do not need to reformat all your
> code. It just removes or add those pieces of code in the appropiate gap
> without rewriting all your source code. E.g. if you want to ensure that
> there is no dead code or apply an specific license.
>
> It also respects the Line End of each source file but, if you want I can
> work on adapting it to ensure an specific Line End.
>
>
> 2015-11-19 16:36 GMT+01:00 Alex Soto <as...@gmail.com>:
>
>> The good thing about Walkmod is that you don't relay on IDE configuration,
>> it is a separated process that can generate a PR with the changes so all
>> code is uniform.
>>
>> El dj., 19 nov. 2015 a les 16:35, Andy Gumbrecht (<
>> agumbrecht@tomitribe.com>)
>> va escriure:
>>
>> > +1 on anything that promotes a globally uniform format.
>> >
>> > Still need the IDEA settings import/export to match whatever is
>> configured.
>> >
>> > Someone on unix box will have to ensure everything is LF except maybe
>> > *.bat & *.cmd <- Not sure how to handle that, but can be done in
>> > .gitattributes I think?
>> >
>> > --
>> >    Andy Gumbrecht
>> >    https://twitter.com/AndyGeeDe
>> >    http://www.tomitribe.com
>> >
>> >
>>
>
>
>
> --
> Raquel Pau
>
> *"Education is the most powerful weapon which you can use to change the
> world**"*
>
> Nelson Mandela
>
> personal page:
> http://sites.google.com/site/raquelpau/

Re: PMD & Formatting

Posted by Raquel Pau Fernández <ra...@gmail.com>.
Hi,

I am the project lead of Walkmod. I would like to add to Alex comments that
another important feature is that it allows just to apply your code
conventions without rewriting the hole code base according an specific
formatter. Consequently, its executions do not need to reformat all your
code. It just removes or add those pieces of code in the appropiate gap
without rewriting all your source code. E.g. if you want to ensure that
there is no dead code or apply an specific license.

It also respects the Line End of each source file but, if you want I can
work on adapting it to ensure an specific Line End.


2015-11-19 16:36 GMT+01:00 Alex Soto <as...@gmail.com>:

> The good thing about Walkmod is that you don't relay on IDE configuration,
> it is a separated process that can generate a PR with the changes so all
> code is uniform.
>
> El dj., 19 nov. 2015 a les 16:35, Andy Gumbrecht (<
> agumbrecht@tomitribe.com>)
> va escriure:
>
> > +1 on anything that promotes a globally uniform format.
> >
> > Still need the IDEA settings import/export to match whatever is
> configured.
> >
> > Someone on unix box will have to ensure everything is LF except maybe
> > *.bat & *.cmd <- Not sure how to handle that, but can be done in
> > .gitattributes I think?
> >
> > --
> >    Andy Gumbrecht
> >    https://twitter.com/AndyGeeDe
> >    http://www.tomitribe.com
> >
> >
>



-- 
Raquel Pau

*"Education is the most powerful weapon which you can use to change the
world**"*

Nelson Mandela

personal page:
http://sites.google.com/site/raquelpau/

Re: PMD & Formatting

Posted by Alex Soto <as...@gmail.com>.
The good thing about Walkmod is that you don't relay on IDE configuration,
it is a separated process that can generate a PR with the changes so all
code is uniform.

El dj., 19 nov. 2015 a les 16:35, Andy Gumbrecht (<ag...@tomitribe.com>)
va escriure:

> +1 on anything that promotes a globally uniform format.
>
> Still need the IDEA settings import/export to match whatever is configured.
>
> Someone on unix box will have to ensure everything is LF except maybe
> *.bat & *.cmd <- Not sure how to handle that, but can be done in
> .gitattributes I think?
>
> --
>    Andy Gumbrecht
>    https://twitter.com/AndyGeeDe
>    http://www.tomitribe.com
>
>

Re: PMD & Formatting

Posted by Andy Gumbrecht <ag...@tomitribe.com>.
+1 on anything that promotes a globally uniform format.

Still need the IDEA settings import/export to match whatever is configured.

Someone on unix box will have to ensure everything is LF except maybe 
*.bat & *.cmd <- Not sure how to handle that, but can be done in 
.gitattributes I think?

-- 
   Andy Gumbrecht
   https://twitter.com/AndyGeeDe
   http://www.tomitribe.com


Re: PMD & Formatting

Posted by Alex Soto <as...@gmail.com>.
I think that a  good way to maintain all code style using the same format
would be use a tool like Walkmod (http://walkmod.com/) it is only an ida of
course.

Alex

El dj., 19 nov. 2015 a les 16:29, Romain Manni-Bucau (<rm...@gmail.com>)
va escriure:

> Go for it
> Le 19 nov. 2015 06:54, "Thiago Veronezi" <th...@veronezi.org> a écrit :
>
> > Hi guys,
> >
> > is anyone going to commit the files with the wrong line endings?
> >
> > []s,
> > Thiago.
> >
> >
> > On Thu, Nov 19, 2015 at 9:38 AM, Romain Manni-Bucau <
> rmannibucau@gmail.com
> > >
> > wrote:
> >
> > > +1
> > >
> > > Only note: we have a huge codebase so we shouldnt completely reformat
> it
> > > IMO. Said otherwise we should ensure the IDE reformatting keeps code as
> > it
> > > is in 99% of the case
> > >
> > > Ps: thks a lot for the github link!
> > > Le 19 nov. 2015 05:19, "Thiago Veronezi" <th...@veronezi.org> a
> écrit :
> > >
> > > > Formating >>
> > > >
> > > > When I introduced the pmd and checkstyle plugins, I've created a new
> > > maven
> > > > profile in order to keep the simple "mvn clean install" a bit faster.
> > > Maybe
> > > > we could make it run by default without the extra profile? This way,
> a
> > > > developer would know right away when she/he introduced any formatting
> > > > violation without depending on any IDE.
> > > >
> > > > []s,
> > > > Thiago.
> > > >
> > > >
> > > > On Thu, Nov 19, 2015 at 7:43 AM, Andy Gumbrecht <
> > > agumbrecht@tomitribe.com>
> > > > wrote:
> > > >
> > > > > Hi everyone,
> > > > >
> > > > > We keep running into PMD and formatting issues, as well as line
> > ending
> > > > > issues. These are just some ideas I'd like to run by you all, but
> > > please
> > > > > check the line-ending doc. Whatever we decide upon needs to be
> > applied
> > > > asap.
> > > > >
> > > > > Line Endings
> > > > > -----------------
> > > > > Line ending issues need to be resolved by everyone using this
> > > > > documentation (for your OS of choice):
> > > > > https://help.github.com/articles/dealing-with-line-endings/ - as
> > > > probably
> > > > > 99.9% of us are GitHub users, this should be the rule.
> > > > >
> > > > > Please feel free to add to and extend the attributes with anything
> > that
> > > > > may be missing, but do not remove the basic structure of:
> > > > > https://github.com/apache/tomee/blob/master/.gitattributes
> > > > >
> > > > > Formatting
> > > > > ---------------
> > > > > Basically, pressing CTRL+ALT+L (Reformat) should result it the same
> > for
> > > > > everyone that is hacking on TomEE. This includes all project files.
> > > > >
> > > > > The only way this is going to work is if we define a rigid guide
> or,
> > > even
> > > > > better, provide an Intellij-IDEA settings import/export file for
> > > everyone
> > > > > to use as a foundation.
> > > > >
> > > > > David, as the project lead and our glorious master of all things
> > magic,
> > > > it
> > > > > would be great if you could provide this. I'm going to update the
> > site
> > > a
> > > > > bit, so would be great to get this added as soon as possible.
> > > > >
> > > > > Once we have this then a global reformat should be possible across
> > the
> > > > > entire project base. Enabling and using @formatter:off/on should be
> > > used
> > > > to
> > > > > protect critical sections.
> > > > >
> > > > > Feedback welcome.
> > > > >
> > > > > Andy.
> > > > >
> > > > > --
> > > > >   Andy Gumbrecht
> > > > >   https://twitter.com/AndyGeeDe
> > > > >   http://www.tomitribe.com
> > > > >
> > > > >
> > > >
> > >
> >
>

Re: PMD & Formatting

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Go for it
Le 19 nov. 2015 06:54, "Thiago Veronezi" <th...@veronezi.org> a écrit :

> Hi guys,
>
> is anyone going to commit the files with the wrong line endings?
>
> []s,
> Thiago.
>
>
> On Thu, Nov 19, 2015 at 9:38 AM, Romain Manni-Bucau <rmannibucau@gmail.com
> >
> wrote:
>
> > +1
> >
> > Only note: we have a huge codebase so we shouldnt completely reformat it
> > IMO. Said otherwise we should ensure the IDE reformatting keeps code as
> it
> > is in 99% of the case
> >
> > Ps: thks a lot for the github link!
> > Le 19 nov. 2015 05:19, "Thiago Veronezi" <th...@veronezi.org> a écrit :
> >
> > > Formating >>
> > >
> > > When I introduced the pmd and checkstyle plugins, I've created a new
> > maven
> > > profile in order to keep the simple "mvn clean install" a bit faster.
> > Maybe
> > > we could make it run by default without the extra profile? This way, a
> > > developer would know right away when she/he introduced any formatting
> > > violation without depending on any IDE.
> > >
> > > []s,
> > > Thiago.
> > >
> > >
> > > On Thu, Nov 19, 2015 at 7:43 AM, Andy Gumbrecht <
> > agumbrecht@tomitribe.com>
> > > wrote:
> > >
> > > > Hi everyone,
> > > >
> > > > We keep running into PMD and formatting issues, as well as line
> ending
> > > > issues. These are just some ideas I'd like to run by you all, but
> > please
> > > > check the line-ending doc. Whatever we decide upon needs to be
> applied
> > > asap.
> > > >
> > > > Line Endings
> > > > -----------------
> > > > Line ending issues need to be resolved by everyone using this
> > > > documentation (for your OS of choice):
> > > > https://help.github.com/articles/dealing-with-line-endings/ - as
> > > probably
> > > > 99.9% of us are GitHub users, this should be the rule.
> > > >
> > > > Please feel free to add to and extend the attributes with anything
> that
> > > > may be missing, but do not remove the basic structure of:
> > > > https://github.com/apache/tomee/blob/master/.gitattributes
> > > >
> > > > Formatting
> > > > ---------------
> > > > Basically, pressing CTRL+ALT+L (Reformat) should result it the same
> for
> > > > everyone that is hacking on TomEE. This includes all project files.
> > > >
> > > > The only way this is going to work is if we define a rigid guide or,
> > even
> > > > better, provide an Intellij-IDEA settings import/export file for
> > everyone
> > > > to use as a foundation.
> > > >
> > > > David, as the project lead and our glorious master of all things
> magic,
> > > it
> > > > would be great if you could provide this. I'm going to update the
> site
> > a
> > > > bit, so would be great to get this added as soon as possible.
> > > >
> > > > Once we have this then a global reformat should be possible across
> the
> > > > entire project base. Enabling and using @formatter:off/on should be
> > used
> > > to
> > > > protect critical sections.
> > > >
> > > > Feedback welcome.
> > > >
> > > > Andy.
> > > >
> > > > --
> > > >   Andy Gumbrecht
> > > >   https://twitter.com/AndyGeeDe
> > > >   http://www.tomitribe.com
> > > >
> > > >
> > >
> >
>

Re: PMD & Formatting

Posted by Thiago Veronezi <th...@veronezi.org>.
Hi guys,

is anyone going to commit the files with the wrong line endings?

[]s,
Thiago.


On Thu, Nov 19, 2015 at 9:38 AM, Romain Manni-Bucau <rm...@gmail.com>
wrote:

> +1
>
> Only note: we have a huge codebase so we shouldnt completely reformat it
> IMO. Said otherwise we should ensure the IDE reformatting keeps code as it
> is in 99% of the case
>
> Ps: thks a lot for the github link!
> Le 19 nov. 2015 05:19, "Thiago Veronezi" <th...@veronezi.org> a écrit :
>
> > Formating >>
> >
> > When I introduced the pmd and checkstyle plugins, I've created a new
> maven
> > profile in order to keep the simple "mvn clean install" a bit faster.
> Maybe
> > we could make it run by default without the extra profile? This way, a
> > developer would know right away when she/he introduced any formatting
> > violation without depending on any IDE.
> >
> > []s,
> > Thiago.
> >
> >
> > On Thu, Nov 19, 2015 at 7:43 AM, Andy Gumbrecht <
> agumbrecht@tomitribe.com>
> > wrote:
> >
> > > Hi everyone,
> > >
> > > We keep running into PMD and formatting issues, as well as line ending
> > > issues. These are just some ideas I'd like to run by you all, but
> please
> > > check the line-ending doc. Whatever we decide upon needs to be applied
> > asap.
> > >
> > > Line Endings
> > > -----------------
> > > Line ending issues need to be resolved by everyone using this
> > > documentation (for your OS of choice):
> > > https://help.github.com/articles/dealing-with-line-endings/ - as
> > probably
> > > 99.9% of us are GitHub users, this should be the rule.
> > >
> > > Please feel free to add to and extend the attributes with anything that
> > > may be missing, but do not remove the basic structure of:
> > > https://github.com/apache/tomee/blob/master/.gitattributes
> > >
> > > Formatting
> > > ---------------
> > > Basically, pressing CTRL+ALT+L (Reformat) should result it the same for
> > > everyone that is hacking on TomEE. This includes all project files.
> > >
> > > The only way this is going to work is if we define a rigid guide or,
> even
> > > better, provide an Intellij-IDEA settings import/export file for
> everyone
> > > to use as a foundation.
> > >
> > > David, as the project lead and our glorious master of all things magic,
> > it
> > > would be great if you could provide this. I'm going to update the site
> a
> > > bit, so would be great to get this added as soon as possible.
> > >
> > > Once we have this then a global reformat should be possible across the
> > > entire project base. Enabling and using @formatter:off/on should be
> used
> > to
> > > protect critical sections.
> > >
> > > Feedback welcome.
> > >
> > > Andy.
> > >
> > > --
> > >   Andy Gumbrecht
> > >   https://twitter.com/AndyGeeDe
> > >   http://www.tomitribe.com
> > >
> > >
> >
>

Re: PMD & Formatting

Posted by Romain Manni-Bucau <rm...@gmail.com>.
+1

Only note: we have a huge codebase so we shouldnt completely reformat it
IMO. Said otherwise we should ensure the IDE reformatting keeps code as it
is in 99% of the case

Ps: thks a lot for the github link!
Le 19 nov. 2015 05:19, "Thiago Veronezi" <th...@veronezi.org> a écrit :

> Formating >>
>
> When I introduced the pmd and checkstyle plugins, I've created a new maven
> profile in order to keep the simple "mvn clean install" a bit faster. Maybe
> we could make it run by default without the extra profile? This way, a
> developer would know right away when she/he introduced any formatting
> violation without depending on any IDE.
>
> []s,
> Thiago.
>
>
> On Thu, Nov 19, 2015 at 7:43 AM, Andy Gumbrecht <ag...@tomitribe.com>
> wrote:
>
> > Hi everyone,
> >
> > We keep running into PMD and formatting issues, as well as line ending
> > issues. These are just some ideas I'd like to run by you all, but please
> > check the line-ending doc. Whatever we decide upon needs to be applied
> asap.
> >
> > Line Endings
> > -----------------
> > Line ending issues need to be resolved by everyone using this
> > documentation (for your OS of choice):
> > https://help.github.com/articles/dealing-with-line-endings/ - as
> probably
> > 99.9% of us are GitHub users, this should be the rule.
> >
> > Please feel free to add to and extend the attributes with anything that
> > may be missing, but do not remove the basic structure of:
> > https://github.com/apache/tomee/blob/master/.gitattributes
> >
> > Formatting
> > ---------------
> > Basically, pressing CTRL+ALT+L (Reformat) should result it the same for
> > everyone that is hacking on TomEE. This includes all project files.
> >
> > The only way this is going to work is if we define a rigid guide or, even
> > better, provide an Intellij-IDEA settings import/export file for everyone
> > to use as a foundation.
> >
> > David, as the project lead and our glorious master of all things magic,
> it
> > would be great if you could provide this. I'm going to update the site a
> > bit, so would be great to get this added as soon as possible.
> >
> > Once we have this then a global reformat should be possible across the
> > entire project base. Enabling and using @formatter:off/on should be used
> to
> > protect critical sections.
> >
> > Feedback welcome.
> >
> > Andy.
> >
> > --
> >   Andy Gumbrecht
> >   https://twitter.com/AndyGeeDe
> >   http://www.tomitribe.com
> >
> >
>

Re: PMD & Formatting

Posted by Thiago Veronezi <th...@veronezi.org>.
Formating >>

When I introduced the pmd and checkstyle plugins, I've created a new maven
profile in order to keep the simple "mvn clean install" a bit faster. Maybe
we could make it run by default without the extra profile? This way, a
developer would know right away when she/he introduced any formatting
violation without depending on any IDE.

[]s,
Thiago.


On Thu, Nov 19, 2015 at 7:43 AM, Andy Gumbrecht <ag...@tomitribe.com>
wrote:

> Hi everyone,
>
> We keep running into PMD and formatting issues, as well as line ending
> issues. These are just some ideas I'd like to run by you all, but please
> check the line-ending doc. Whatever we decide upon needs to be applied asap.
>
> Line Endings
> -----------------
> Line ending issues need to be resolved by everyone using this
> documentation (for your OS of choice):
> https://help.github.com/articles/dealing-with-line-endings/ - as probably
> 99.9% of us are GitHub users, this should be the rule.
>
> Please feel free to add to and extend the attributes with anything that
> may be missing, but do not remove the basic structure of:
> https://github.com/apache/tomee/blob/master/.gitattributes
>
> Formatting
> ---------------
> Basically, pressing CTRL+ALT+L (Reformat) should result it the same for
> everyone that is hacking on TomEE. This includes all project files.
>
> The only way this is going to work is if we define a rigid guide or, even
> better, provide an Intellij-IDEA settings import/export file for everyone
> to use as a foundation.
>
> David, as the project lead and our glorious master of all things magic, it
> would be great if you could provide this. I'm going to update the site a
> bit, so would be great to get this added as soon as possible.
>
> Once we have this then a global reformat should be possible across the
> entire project base. Enabling and using @formatter:off/on should be used to
> protect critical sections.
>
> Feedback welcome.
>
> Andy.
>
> --
>   Andy Gumbrecht
>   https://twitter.com/AndyGeeDe
>   http://www.tomitribe.com
>
>