RE: New PMD and Checkstyle tasks

2003-03-06 Thread Dasgupta, Diptiman (Cognizant)
Hi,

  Pls unsubscribe me 

-Original Message-
From: Bill Chmura [mailto:[EMAIL PROTECTED]
Sent: Monday, January 06, 2003 9:25 AM
To: 'Struts Developers List'
Subject: RE: New PMD and Checkstyle tasks



I have not contributed any code directly to the Struts project, so I
feel a little squimish about saying it - but I would put forth, humbly,
that maybe just following the Jakarta (hence Sun) standards would be the
best thing to aim for.  

I am sure that everyone would agree that having unused imports removed
would be good, also dead code removal would also be a nice thing I am
sure everyone would agree...  But starting a discussion on where the {}
should be, etc, could be a little like igniting a holy war...

Obviously you all can decide it, but I would almost approach it from
discuss why not to use the existing standards point of view...

Just my thoughts


-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED] 
Sent: Sunday, January 05, 2003 6:35 PM
To: Struts Developers List
Subject: RE: New PMD and Checkstyle tasks




On Sun, 5 Jan 2003, Martin Cooper wrote:

 Date: Sun, 5 Jan 2003 12:32:25 -0800 (PST)
 From: Martin Cooper [EMAIL PROTECTED]
 Reply-To: Struts Developers List [EMAIL PROTECTED]
 To: Struts Developers List [EMAIL PROTECTED]
 Subject: RE: New PMD and Checkstyle tasks



 On Sun, 5 Jan 2003, Bill Chmura wrote:

 
  Sounds great... I've used checkstyle for a while now and it has done

  a good job for the most part.
 
  About the 9,000 errors it produced (maybe errors is not the right 
  word)

 Yah - perhaps I should have said 'violations'.

  - a good many of them are probably due to the difference between the

  Sun Coding standards and the Apache coding standards.  I have mostly

 Well, the default coding conventions in Jakarta *are* the Sun coding 
 conventions, so I'd say we have a problem... ;-)


That's something we can change if we want to define our own (Struts
project wide) standards.  I'm game if people want to spend some time
doing this (although I've got some emotional attachment to certain
stylistic patterns, it's not the most important thing in the world).

The existing code base, as many have observed, does *not* conform to a
single specific style standard, because it (and my personal adaptation
of the Sun coding standards) evolved over time and/or I finally started
doing some things ({ ... } around single-statement conditionals) that I
should have been doing from the very beginning.

It would help the readability of the code (and therefore
understandability for all developers) to have a single commonly used
style.  However, I've got two requests:

* Let's have a *very* brief discussion and agreement on
  a single style, if we can.  I've seen marriages break
  up over the color of a carpet -- developers fighting
  over this issue would be equaly stupid.

* Once we decide on a style, the task of adadpting the
  existing code starts.  Please ensure that, if you're
  doing the checkins for that, you ***only*** do the
  formatting changes on a single commit -- no sneaking
  functionality changes in :-).

 --
 Martin Cooper


Craig


--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]

** Message from InterScan E-Mail VirusWall NT **

** No virus found in attached file noname.htm

No Virus detected in the attached file(s).
* End of message ***


This e-mail and any files transmitted with it are for the sole use of the intended 
recipient(s) and may contain confidential and privileged information. If you are not 
the 
intended recipient, please contact the sender by reply e-mail and destroy all copies 
of 
the original message. 
Any unauthorised review, use, disclosure, dissemination, forwarding, printing or 
copying 
of this email or any action taken in reliance on this e-mail is strictly prohibited 
and 
may be unlawful.

  Visit us at http://www.cognizant.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: New PMD and Checkstyle tasks

2003-03-06 Thread Asif Qamar
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]


On Thursday 06 March 2003 01:51, Dasgupta, Diptiman (Cognizant) wrote:
 Hi,

   Pls unsubscribe me

 -Original Message-
 From: Bill Chmura [mailto:[EMAIL PROTECTED]
 Sent: Monday, January 06, 2003 9:25 AM
 To: 'Struts Developers List'
 Subject: RE: New PMD and Checkstyle tasks



 I have not contributed any code directly to the Struts project, so I
 feel a little squimish about saying it - but I would put forth, humbly,
 that maybe just following the Jakarta (hence Sun) standards would be the
 best thing to aim for.

 I am sure that everyone would agree that having unused imports removed
 would be good, also dead code removal would also be a nice thing I am
 sure everyone would agree...  But starting a discussion on where the {}
 should be, etc, could be a little like igniting a holy war...

 Obviously you all can decide it, but I would almost approach it from
 discuss why not to use the existing standards point of view...

 Just my thoughts


 -Original Message-
 From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]
 Sent: Sunday, January 05, 2003 6:35 PM
 To: Struts Developers List
 Subject: RE: New PMD and Checkstyle tasks

 On Sun, 5 Jan 2003, Martin Cooper wrote:
  Date: Sun, 5 Jan 2003 12:32:25 -0800 (PST)
  From: Martin Cooper [EMAIL PROTECTED]
  Reply-To: Struts Developers List [EMAIL PROTECTED]
  To: Struts Developers List [EMAIL PROTECTED]
  Subject: RE: New PMD and Checkstyle tasks
 
  On Sun, 5 Jan 2003, Bill Chmura wrote:
   Sounds great... I've used checkstyle for a while now and it has done
  
   a good job for the most part.
  
   About the 9,000 errors it produced (maybe errors is not the right
   word)
 
  Yah - perhaps I should have said 'violations'.
 
   - a good many of them are probably due to the difference between the
  
   Sun Coding standards and the Apache coding standards.  I have mostly
 
  Well, the default coding conventions in Jakarta *are* the Sun coding
  conventions, so I'd say we have a problem... ;-)

 That's something we can change if we want to define our own (Struts
 project wide) standards.  I'm game if people want to spend some time
 doing this (although I've got some emotional attachment to certain
 stylistic patterns, it's not the most important thing in the world).

 The existing code base, as many have observed, does *not* conform to a
 single specific style standard, because it (and my personal adaptation
 of the Sun coding standards) evolved over time and/or I finally started
 doing some things ({ ... } around single-statement conditionals) that I
 should have been doing from the very beginning.

 It would help the readability of the code (and therefore
 understandability for all developers) to have a single commonly used
 style.  However, I've got two requests:

 * Let's have a *very* brief discussion and agreement on
   a single style, if we can.  I've seen marriages break
   up over the color of a carpet -- developers fighting
   over this issue would be equaly stupid.

 * Once we decide on a style, the task of adadpting the
   existing code starts.  Please ensure that, if you're
   doing the checkins for that, you ***only*** do the
   formatting changes on a single commit -- no sneaking
   functionality changes in :-).

  --
  Martin Cooper

 Craig


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: New PMD and Checkstyle tasks

2003-03-06 Thread David Graham
At the bottom of every email sent to the list is a link to unsubscribe.  It 
can't get any easier/clearer than that.

David



From: Dasgupta, Diptiman (Cognizant) [EMAIL PROTECTED]
Reply-To: Struts Developers List [EMAIL PROTECTED]
To: Struts Developers List [EMAIL PROTECTED]
Subject: RE: New PMD and Checkstyle tasks
Date: Thu, 6 Mar 2003 15:21:36 +0530
Hi,

  Pls unsubscribe me

-Original Message-
From: Bill Chmura [mailto:[EMAIL PROTECTED]
Sent: Monday, January 06, 2003 9:25 AM
To: 'Struts Developers List'
Subject: RE: New PMD and Checkstyle tasks


I have not contributed any code directly to the Struts project, so I
feel a little squimish about saying it - but I would put forth, humbly,
that maybe just following the Jakarta (hence Sun) standards would be the
best thing to aim for.
I am sure that everyone would agree that having unused imports removed
would be good, also dead code removal would also be a nice thing I am
sure everyone would agree...  But starting a discussion on where the {}
should be, etc, could be a little like igniting a holy war...
Obviously you all can decide it, but I would almost approach it from
discuss why not to use the existing standards point of view...
Just my thoughts

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]
Sent: Sunday, January 05, 2003 6:35 PM
To: Struts Developers List
Subject: RE: New PMD and Checkstyle tasks


On Sun, 5 Jan 2003, Martin Cooper wrote:

 Date: Sun, 5 Jan 2003 12:32:25 -0800 (PST)
 From: Martin Cooper [EMAIL PROTECTED]
 Reply-To: Struts Developers List [EMAIL PROTECTED]
 To: Struts Developers List [EMAIL PROTECTED]
 Subject: RE: New PMD and Checkstyle tasks



 On Sun, 5 Jan 2003, Bill Chmura wrote:

 
  Sounds great... I've used checkstyle for a while now and it has done
  a good job for the most part.
 
  About the 9,000 errors it produced (maybe errors is not the right
  word)

 Yah - perhaps I should have said 'violations'.

  - a good many of them are probably due to the difference between the
  Sun Coding standards and the Apache coding standards.  I have mostly

 Well, the default coding conventions in Jakarta *are* the Sun coding
 conventions, so I'd say we have a problem... ;-)

That's something we can change if we want to define our own (Struts
project wide) standards.  I'm game if people want to spend some time
doing this (although I've got some emotional attachment to certain
stylistic patterns, it's not the most important thing in the world).
The existing code base, as many have observed, does *not* conform to a
single specific style standard, because it (and my personal adaptation
of the Sun coding standards) evolved over time and/or I finally started
doing some things ({ ... } around single-statement conditionals) that I
should have been doing from the very beginning.
It would help the readability of the code (and therefore
understandability for all developers) to have a single commonly used
style.  However, I've got two requests:
* Let's have a *very* brief discussion and agreement on
  a single style, if we can.  I've seen marriages break
  up over the color of a carpet -- developers fighting
  over this issue would be equaly stupid.
* Once we decide on a style, the task of adadpting the
  existing code starts.  Please ensure that, if you're
  doing the checkins for that, you ***only*** do the
  formatting changes on a single commit -- no sneaking
  functionality changes in :-).
 --
 Martin Cooper

Craig

--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail: 
mailto:[EMAIL PROTECTED]

 InterScan_SafeStamp.txt 
 InterScan_Disclaimer.txt 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


_
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: New PMD and Checkstyle tasks

2003-01-05 Thread Martin Cooper


On Sun, 5 Jan 2003, Bill Chmura wrote:


 Sounds great... I've used checkstyle for a while now and it has done a
 good job for the most part.

 About the 9,000 errors it produced (maybe errors is not the right word)

Yah - perhaps I should have said 'violations'.

 - a good many of them are probably due to the difference between the Sun
 Coding standards and the Apache coding standards.  I have mostly

Well, the default coding conventions in Jakarta *are* the Sun coding
conventions, so I'd say we have a problem... ;-)

--
Martin Cooper


 followed the Sun standards in my projects and are not as familiar with
 the Apache rules.  Do you think that most of these are due to the
 discrepencies betwix the two?  I am not advocating fixing them, just
 wondering...

 Bill



 -Original Message-
 From: Martin Cooper [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, January 05, 2003 2:20 AM
 To: [EMAIL PROTECTED]
 Subject: New PMD and Checkstyle tasks


 I've added two new tasks to the main build.xml file to allow us to
 easily run PMD and Checkstyle on the entire src/share source tree. Even
 if you don't know what these tools are, read on.

 PMD
 ---

 PMD is a Java source code analyzer which can detect many, many different
 kinds of problems, including unused imports, unused variables, etc., and
 report them in different ways.

 To run the PMD task, you need to first download PMD from here:

 http://sourceforge.net/projects/pmd/

 and set the pmd.jar property in your build.properties file with
 something like this:

 pmd.jar = /Java/pmd/lib/pmd-1.01.jar

 Then you can invoke the task like this:

 ant pmd

 This will create an HTML output file named pmdreport.html in the Struts
 root directory. The task is configured to report only unused imports,
 duplicate imports, and unused variables and methods, but we can expand
 the set of checks and/or use multiple targets for different sets of
 checks as we gain more experience with it.

 Checkstyle
 --

 Checkstyle is a tool that checks source code against a defined set of
 coding conventions. The default is to check against the Sun coding
 conventions, and I've left the settings at the default for now.

 To run the Checkstyle task, you need to first download Checkstyle from
 here:

 http://sourceforge.net/projects/checkstyle/

 and set the checkstyle.jar property in your build.properties file with
 something like this:

 checkstyle.jar = /Java/checkstyle-2.4/checkstyle-all-2.4.jar

 Then you can invoke the task like this:

 ant -logfile checkstyle.log checkstyle

 Right now, you *will* need to specify a log file, because Checkstyle is
 reporting 9,884 errors! Note that I am *not* advocating that we start a
 crusade to fix these before Struts 1.1 Final. In fact, I think that
 would be counterproductive at this point.


 Each of the tasks described above is conditional on the corresponding
 property being set in your build.properties file. If the property is not
 set, invoking the task simply does nothing.

 At some point, it might be nice to have these tasks generate XML and run
 the output through XSLT to generate customised HTML. However, if we move
 to Maven (which I'd really like to do as soon as both 1.1 Final and
 Maven are released), we may not need to worry about this.

 --
 Martin Cooper



 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]


 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: New PMD and Checkstyle tasks

2003-01-05 Thread Craig R. McClanahan


On Sun, 5 Jan 2003, Martin Cooper wrote:

 Date: Sun, 5 Jan 2003 12:32:25 -0800 (PST)
 From: Martin Cooper [EMAIL PROTECTED]
 Reply-To: Struts Developers List [EMAIL PROTECTED]
 To: Struts Developers List [EMAIL PROTECTED]
 Subject: RE: New PMD and Checkstyle tasks



 On Sun, 5 Jan 2003, Bill Chmura wrote:

 
  Sounds great... I've used checkstyle for a while now and it has done a
  good job for the most part.
 
  About the 9,000 errors it produced (maybe errors is not the right word)

 Yah - perhaps I should have said 'violations'.

  - a good many of them are probably due to the difference between the Sun
  Coding standards and the Apache coding standards.  I have mostly

 Well, the default coding conventions in Jakarta *are* the Sun coding
 conventions, so I'd say we have a problem... ;-)


That's something we can change if we want to define our own (Struts
project wide) standards.  I'm game if people want to spend some time doing
this (although I've got some emotional attachment to certain stylistic
patterns, it's not the most important thing in the world).

The existing code base, as many have observed, does *not* conform to a
single specific style standard, because it (and my personal adaptation of
the Sun coding standards) evolved over time and/or I finally started doing
some things ({ ... } around single-statement conditionals) that I should
have been doing from the very beginning.

It would help the readability of the code (and therefore understandability
for all developers) to have a single commonly used style.  However, I've
got two requests:

* Let's have a *very* brief discussion and agreement on
  a single style, if we can.  I've seen marriages break
  up over the color of a carpet -- developers fighting
  over this issue would be equaly stupid.

* Once we decide on a style, the task of adadpting the
  existing code starts.  Please ensure that, if you're
  doing the checkins for that, you ***only*** do the
  formatting changes on a single commit -- no sneaking
  functionality changes in :-).

 --
 Martin Cooper


Craig


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: New PMD and Checkstyle tasks

2003-01-05 Thread Bill Chmura

I have not contributed any code directly to the Struts project, so I
feel a little squimish about saying it - but I would put forth, humbly,
that maybe just following the Jakarta (hence Sun) standards would be the
best thing to aim for.  

I am sure that everyone would agree that having unused imports removed
would be good, also dead code removal would also be a nice thing I am
sure everyone would agree...  But starting a discussion on where the {}
should be, etc, could be a little like igniting a holy war...

Obviously you all can decide it, but I would almost approach it from
discuss why not to use the existing standards point of view...

Just my thoughts


-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, January 05, 2003 6:35 PM
To: Struts Developers List
Subject: RE: New PMD and Checkstyle tasks




On Sun, 5 Jan 2003, Martin Cooper wrote:

 Date: Sun, 5 Jan 2003 12:32:25 -0800 (PST)
 From: Martin Cooper [EMAIL PROTECTED]
 Reply-To: Struts Developers List [EMAIL PROTECTED]
 To: Struts Developers List [EMAIL PROTECTED]
 Subject: RE: New PMD and Checkstyle tasks



 On Sun, 5 Jan 2003, Bill Chmura wrote:

 
  Sounds great... I've used checkstyle for a while now and it has done

  a good job for the most part.
 
  About the 9,000 errors it produced (maybe errors is not the right 
  word)

 Yah - perhaps I should have said 'violations'.

  - a good many of them are probably due to the difference between the

  Sun Coding standards and the Apache coding standards.  I have mostly

 Well, the default coding conventions in Jakarta *are* the Sun coding 
 conventions, so I'd say we have a problem... ;-)


That's something we can change if we want to define our own (Struts
project wide) standards.  I'm game if people want to spend some time
doing this (although I've got some emotional attachment to certain
stylistic patterns, it's not the most important thing in the world).

The existing code base, as many have observed, does *not* conform to a
single specific style standard, because it (and my personal adaptation
of the Sun coding standards) evolved over time and/or I finally started
doing some things ({ ... } around single-statement conditionals) that I
should have been doing from the very beginning.

It would help the readability of the code (and therefore
understandability for all developers) to have a single commonly used
style.  However, I've got two requests:

* Let's have a *very* brief discussion and agreement on
  a single style, if we can.  I've seen marriages break
  up over the color of a carpet -- developers fighting
  over this issue would be equaly stupid.

* Once we decide on a style, the task of adadpting the
  existing code starts.  Please ensure that, if you're
  doing the checkins for that, you ***only*** do the
  formatting changes on a single commit -- no sneaking
  functionality changes in :-).

 --
 Martin Cooper


Craig


--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




New PMD and Checkstyle tasks

2003-01-04 Thread Martin Cooper
I've added two new tasks to the main build.xml file to allow us to easily
run PMD and Checkstyle on the entire src/share source tree. Even if you
don't know what these tools are, read on.

PMD
---

PMD is a Java source code analyzer which can detect many, many different
kinds of problems, including unused imports, unused variables, etc., and
report them in different ways.

To run the PMD task, you need to first download PMD from here:

http://sourceforge.net/projects/pmd/

and set the pmd.jar property in your build.properties file with something
like this:

pmd.jar = /Java/pmd/lib/pmd-1.01.jar

Then you can invoke the task like this:

ant pmd

This will create an HTML output file named pmdreport.html in the Struts
root directory. The task is configured to report only unused imports,
duplicate imports, and unused variables and methods, but we can expand the
set of checks and/or use multiple targets for different sets of checks as
we gain more experience with it.

Checkstyle
--

Checkstyle is a tool that checks source code against a defined set of
coding conventions. The default is to check against the Sun coding
conventions, and I've left the settings at the default for now.

To run the Checkstyle task, you need to first download Checkstyle from
here:

http://sourceforge.net/projects/checkstyle/

and set the checkstyle.jar property in your build.properties file with
something like this:

checkstyle.jar = /Java/checkstyle-2.4/checkstyle-all-2.4.jar

Then you can invoke the task like this:

ant -logfile checkstyle.log checkstyle

Right now, you *will* need to specify a log file, because Checkstyle is
reporting 9,884 errors! Note that I am *not* advocating that we start a
crusade to fix these before Struts 1.1 Final. In fact, I think that would
be counterproductive at this point.


Each of the tasks described above is conditional on the corresponding
property being set in your build.properties file. If the property is not
set, invoking the task simply does nothing.

At some point, it might be nice to have these tasks generate XML and run
the output through XSLT to generate customised HTML. However, if we move
to Maven (which I'd really like to do as soon as both 1.1 Final and Maven
are released), we may not need to worry about this.

--
Martin Cooper



--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]