Skip to content

Formatting for Eclipse

rajatkhanna1994 edited this page Apr 16, 2018 · 13 revisions

Formatting

The coding conventions defined in soot_checkstyle_checks.xml are automatically checked with Maven Checkstyle plugin and the build fails if the conventions are not followed.

<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-checkstyle-plugin</artifactId>
	<version>${maven-checkstyle-plugin.version}</version>
	<dependencies>
		<dependency>
			<groupId>com.puppycrawl.tools</groupId>
			<artifactId>checkstyle</artifactId>
			<version>${checkstyle.version}</version>
		</dependency>
	</dependencies>
	<executions>
		<execution>
			<id>validate</id>
			<phase>validate</phase>
			<configuration>
				<propertyExpansion>config_loc=${checkstyle.dir.path}</propertyExpansion>
				<configLocation>${checkstyle.file.path}</configLocation>
				<encoding>UTF-8</encoding>
				<consoleOutput>true</consoleOutput>
				<failsOnError>true</failsOnError>
				<violationSeverity>warning</violationSeverity>
			</configuration>
			<goals>
				<goal>check</goal>
			</goals>
		</execution>
	</executions>
</plugin>
Clone this wiki locally