WASdev / standards.jsr352.jbatch

Home of 'jbatch', a compatible implementation of the Jakarta Batch specification (and the former Reference Implementation for the JSR 352, Batch Applications for the Java Platform specification).
Other
21 stars 18 forks source link

[#27] Add Checkstyle #31

Closed BrentDouglas closed 8 years ago

BrentDouglas commented 9 years ago

Broken into 2 commits. The first adds the config as per #27 (and also checks for trailing whitespace). The next fixes left curly violations. To pass the tabs and trailing whitespace rules run this script in the root of the repo. Providing them as commits will cause merge issues with pretty much any other changes.

#!/bin/bash
find . -name '*.java' ! -type d -exec bash -c 'expand -t 4 "$0" > /tmp/e && mv /tmp/e "$0"' {} \;
find . -name '*.xml'  ! -type d -exec bash -c 'expand -t 4 "$0" > /tmp/e && mv /tmp/e "$0"' {} \;
git commit -a -m "Replace tabs with 4 spaces."
find . -name '*.java' ! -type d -exec bash -c 'sed --in-place -e "s/[[:space:]]*$//" "$0"' {} \;
find . -name '*.xml'  ! -type d -exec bash -c 'sed --in-place -e "s/[[:space:]]*$//" "$0"' {} \;
find ./com.ibm.jbatch.container/src/main/resources/META-INF/services/ -name '*.properties'  ! -type d -exec bash -c 'sed --in-place -e "s/[[:space:]]*$//" "$0"' {} \;
git commit -a -m "Remove trailing whitespace."