WALKMOD_HOME
.
WALKMOD_HOME/bin
folder to
your PATH
environment variable.
walkmod --version
. It
should print out your installed version of walkmod, for example: Walkmod version "3.0"
Java version: 1.8.0_101
Java Home: /Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre
OS: Mac OS X, Version: 10.12.2
brew install walkmod
WalkMod started as a framework to write code transformations. However, most of the users look for quick fixes for existing static code analysis tools. Here appear the commands to get the results.
walkmod apply pmd
walkmod apply checkstyle
walkmod apply -DauthToken="THIS_IS_MY_TOKEN" -DsonarHost="https://sonarqube.com" sonar
If you are you interested to selectively apply the required changes incrementally, you need to use WalkModHub.
Otherwise, if you want to learn how to use more complex code transformations through a fixed configuration (walkmod.xml
), read our documentation.
pom.xml
. This example, shows you how to apply quick fixes for PMD using Maven.
<plugin>And run
<groupId>org.walkmod.maven.plugins</groupId>
<artifactId>walkmod-maven-plugin</artifactId>
<version>1.0.3</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>apply</goal>
</goals>
<configuration>
<chains>pmd</chains>
<properties>configurationFile=rulesets/java/basic.xml</properties>
</configuration>
</execution>
</executions>
</plugin>
mvn package
In order set your custom configuration parameters, visit the official plugin site and also learn What is SAP Successfactor?
build.gradle
. This example, shows you how to apply quick fixes for PMD using Gradle.
buildscript {And run
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath 'org.walkmod:gradle-walkmod-plugin:0.0.1'
}
}
apply plugin: 'walkmod'
walkmod {
chains = [ 'pmd' ]
}
gradle walkmodApply
In order set your custom configuration parameters, visit the official plugin site
You can easily contribute, by starring or forking our .
If you would like to add new quick fix is for an specific static code analysis rule (e.g PMD, CheckStyle, SonarQube), follow the next steps:
We also provide professional services to add more quick fixes to our tool.
Do you like this freebie? Want to get more stuff like this?
Subscribe to our newsletter and twitter to stay tuned on automatic quick fix and clean code.