[ checkstyle-Feature Requests-1220208 ] Add FXCop checks

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[ checkstyle-Feature Requests-1220208 ] Add FXCop checks

Feature Requests item #1220208, was opened at 2005-06-14 11:06
Message generated for change (Comment added) made by lkuehne
You can respond by visiting:

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Priority: 5
Submitted By: Sebastian Dietrich (sebidietrich)
Assigned to: Nobody/Anonymous (nobody)
Summary: Add FXCop checks

Initial Comment:
FX Cop (MS-tool for .Net developers) has a number of
checks that are as well interesting in java development

*) DoNotRaiseReservedExceptionTypes -> do not throw
Exception or RuntimeException
*) DoNotCatchGeneralExceptionTypes -> do not catch
Exception or Throwable
*) RethrowToPreserveStackDetails -> do not rethrow
without copying the stack-trace (by setCause())
*) DoNotIgnoreMethodResults -> don't ignore the return
values of methods (controversial)
*) StaticHolderTypesShouldNotHaveConstructors ->
classes with only static methods should have a private
constructor (ans should be abstract)
*) AvoidNamespacesWithFewTypes -> packages with only
1-n classes should not exist
*) AvoidExcessiveLocals -> methods with more than n
variables should be refactored
*) PropertiesShouldNotBeWriteOnly -> properties that
have a setXXX but no getXXX are a design error
*) PropertiesShouldNotReturnArrays -> arrays are
usually a design error - use interfaces
*) ConsiderPassingBaseTypesAsParameters -> parameters
should be defined with the highest possible type in the



>Comment By: Lars K?hne (lkuehne)
Date: 2005-06-14 23:07

Logged In: YES

- StaticHolderTypesShouldNotHaveConstructors is covered by
our HideUtilityClassConstructor check. Once this is
enforced, the FinalClass check implements something similar
to the "and should be abstract" part.

9 checks to go... :-)


Comment By: Oliver Burn (oburn)
Date: 2005-06-14 12:08

Logged In: YES

thanks for these suggestions.


You can respond by visiting:

SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
Checkstyle-devel mailing list
[hidden email]