You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Jerome Lacoste <je...@coffeebreaks.org> on 2004/05/19 17:30:10 UTC

Re: cvs commit: maven-components/maven-project/src/test/java/org/apache/maven/project AbstractProjectTestCase.java

> Perhaps we can run Jalopy in cvs when we commit some modifications. With
> this method, our code will be always well formatted.
> I'll try to do this for all my business projects.

Just as a note: the cruisecontrol project adopted a pretty drastic approach: checkstyle is ran before the build.
Meaning that a incorrect style will prevent you from developping.

I wonder what the cruisecontrol developers think about this enforcement.

I guess that's something one can adopt at the start of a project but not when the project has many files and probably many inconsistencies.
On the other side, one could always use his own style while developing, and reformat before checkin. That would be less restrictive.


And instead of changing automatically the code on the server, I'd rather have an error thrown at commit (rejected commit).

Might be too costly though with CVS (better with a transaction based SCM tool).

Jerome


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


maintaining correct style

Posted by Jerome Lacoste <je...@coffeebreaks.org>.
> An other approach is to change automatically the code on the server with a
> cron like this every day:
> - checkout the code
> - run jalopy or other code formatter
> - checkin all changes with [Maven formatter] in message.
> 
> With this process, we'll have only files checkin in the day that will be
> reformating.

Problem I see with that is: if I work on a branch where the code is not clean, this automatic process may introduce merge conflicts. 
Of course these conflicts can appear by manual style changes, but they are less likely to.

I think I would rather provide the option to the developers to clean their code before checkin, and make it sure that it is a required practice.
People here should be smart enough to run checkstyle task/goal before submitting a patch!

I just don't trust automatic code changes...

But after all, that's just my humble opinion, and as I don't have code in the tree yet, you can just discard it :)

Jerome


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: cvs commit:maven-components/maven-project/src/test/java/org/apache/maven/projectAbstractProjectTestCase.java

Posted by Emmanuel Venisse <em...@venisse.net>.
----- Original Message ----- 
From: "Jerome Lacoste" <je...@coffeebreaks.org>
To: "Maven Developers List" <de...@maven.apache.org>
Sent: Wednesday, May 19, 2004 5:30 PM
Subject: Re: cvs
commit:maven-components/maven-project/src/test/java/org/apache/maven/project
AbstractProjectTestCase.java


>
> > Perhaps we can run Jalopy in cvs when we commit some modifications. With
> > this method, our code will be always well formatted.
> > I'll try to do this for all my business projects.
>
> Just as a note: the cruisecontrol project adopted a pretty drastic
approach: checkstyle is ran before the build.
> Meaning that a incorrect style will prevent you from developping.
>
> I wonder what the cruisecontrol developers think about this enforcement.
>
> I guess that's something one can adopt at the start of a project but not
when the project has many files and probably many inconsistencies.
> On the other side, one could always use his own style while developing,
and reformat before checkin. That would be less restrictive.
>
>
> And instead of changing automatically the code on the server, I'd rather
have an error thrown at commit (rejected commit).
>
> Might be too costly though with CVS (better with a transaction based SCM
tool).

An other approach is to change automatically the code on the server with a
cron like this every day:
- checkout the code
- run jalopy or other code formatter
- checkin all changes with [Maven formatter] in message.

With this process, we'll have only files checkin in the day that will be
reformating.

Emmanuel


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org