On Wednesday 13 Aug 2003 17:44, Alex Blewitt wrote:
> Has anyone got any preferences between using:
>
> import java.util.*
> or
> import java.util.Vector
> import java.util.Enumeration

Fully specified sounds much better ...  :-)

FWIW, You can use Maven's checkstyle report to check on it for you ... 
attached is a checkstyle.xml file that I've used elsewhere (it may need 
adapting to include all of the coding standards on Geronimo). What you need 
to do to use it is edit your project.properties file and add the line
maven.checkstyle.properties=${basedir}/etc/checkstyle.properties
and put the checkstyle.properties in the top level etc/ directory.

That way, whenever you run the checkstyle report it will check the projects 
coding standards :-)

-- 
Andy
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC
	"-//Puppy Crawl//DTD Package Names 1.0//EN"
	"http://www.puppycrawl.com/dtds/configuration_1_1.dtd";>

<module name="Checker">
	<!-- Check that package.html exists -->
	<module name="PackageHtml"/>

	<module name="TreeWalker">
		<property name="tabWidth" value="4"/>

		<!-- Import checks -->
		<module name="AvoidStarImport"/>
		<module name="RedundantImport"/>
		<module name="UnusedImports"/>

		<!-- Modifier checks -->
		<module name="RedundantModifier">
			<property name="tokens" value="METHOD_DEF"/>
		</module>
		<module name="VisibilityModifier">
			<property name="packageAllowed" value="true"/>
			<property name="protectedAllowed" value="true"/>
		</module>

		<!-- Whitespace checks -->
		<module name="ParenPad">
			<property name="option" value="nospace"/>
		</module>

		<!-- Javadoc checks -->
		<module name="JavadocType">
			<property name="versionFormat" value="\$Revision.*\$"/>
		</module>

		<!-- Blocks -->
		<module name="LeftCurly">
			<property name="option" value="nl"/>
		</module>
		<module name="RightCurly">
			<property name="option" value="alone"/>
		</module>
		<module name="OperatorWrap">
			<property name="option" value="eol"/>
		</module>
		<module name="NeedBraces"/>
		<module name="EmptyBlock">
			<property name="option" value="text"/>
		</module>

		<!-- Naming conventions -->
		<module name="ConstantName"/>
		<module name="ParameterName">
			<property name="format" value="^[a-z][a-zA-Z0-9_]*$"/>
		</module>
		<module name="StaticVariableName">
			<property name="format" value="^[a-z][a-zA-Z0-9]*$"/>
		</module>
		<module name="LocalVariableName">
			<property name="format" value="^[a-z][a-zA-Z0-9_]*$"/>
		</module>
		<module name="MemberName">
			<property name="format" value="^[a-z][a-zA-Z0-9]*$"/>
		</module>

		<!-- Size Violations -->
		<module name="FileLength">
			<property name="max" value="2000"/>
		</module>
		<module name="LineLength">
			<property name="max" value="320"/>
		</module>
		<module name="MethodLength">
			<property name="max" value="150"/>
		</module>
	</module>
</module>

Reply via email to