Skip to content

Instantly share code, notes, and snippets.

@jonmbake
Last active December 21, 2015 18:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonmbake/2eaa48f71b5f95a12ba3 to your computer and use it in GitHub Desktop.
Save jonmbake/2eaa48f71b5f95a12ba3 to your computer and use it in GitHub Desktop.
Creating a Checkstyle-Tester DIFF-REPORT steps taken
  1. Did a clean/install of checkstyle before my change
cd ~/projects/git/checkstyle
git checkout c0a664c25194ef7be3b59ce200a9fcd88fbc5c2d
mvn clean install
  1. Cloned checkstyle-contribution and cd'ed cd ~/projects/git/checkstyle-contribution/
  2. Uncommented all projects in projects-to-test-on.properties
  3. Updated my_check.xml to look like:
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
          "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
          "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">


<module name = "Checker">
    <property name="charset" value="UTF-8"/>
    
    <!-- do not change severity to 'error', as that will hide errors caused by exceptions -->
    <property name="severity" value="warning"/>
    
    <module name="TreeWalker">
         <module name="OneStatementPerLineCheck"/>
    </module>
</module>
  1. Ran laucher.sh. Had to modify it slightly to use gsed

./launch.sh -Dcheckstyle.config.location=my_check.xml

  1. Copied over target site cp -R ./target/site ./site_main

  2. Repeated the process for after the change

cd ~/projects/git/checkstyle
git checkout 81a55cac409bb8424f4bccc8e0e2b44792ded327
mvn clean install
# ...
`cp -R ./target/site ./site_fork`
  1. Cloned ashm and compiled the source
cd ~/projects/git/ahsm
javac -cp ~/.m2/repository/org/jsoup/jsoup/1.8.3/jsoup-1.8.3.jar  -sourcepath ./src/ src/attatrol/ahsm/Main.java
# Tried to generate the diff and received the error `Failed to find xref java.lang.IllegalArgumentException: Failed to locate essentual files that belong to the site: /Users/jonmbake/git/checkstyle-contribution/checkstyle-tester/site_main`
java -cp ~/.m2/repository/org/jsoup/jsoup/1.8.3/jsoup-1.8.3.jar:./src/ attatrol/ahsm/Main checkstyle ~/git/checkstyle-contribution/checkstyle-tester/site_main/ ~/git/checkstyle-contribution/checkstyle-tester/site_forked
  1. The script appears to be failing b/c there are missing files in xref
> ls ~/git/checkstyle-contribution/checkstyle-tester/site_forked/xref/
Hbase				apache-ant			file.txt			guava-mvnstyle			java-design-patterns		spring-framework
MaterialDesignLibrary		checkstyle			findbugs			hibernate-orm			lombok-ast			stylesheet.css
Orekit				checkstyle-with-excludes	findbugs-with-excldues		hibernate-orm-with-excludes	openjdk
RxJava				elasticsearch			guava				infinispan			pmd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment