Skip to content

Instantly share code, notes, and snippets.

View quantumcheese's full-sized avatar

Richard Brown quantumcheese

View GitHub Profile
@quantumcheese
quantumcheese / Checkstyle pre-commit hook
Created March 2, 2012 20:34 — forked from davetron5000/Checkstyle pre-commit hook
Pre Commit Hook for running checkstyle on changed files
#!/usr/bin/perl
#
# Pre-commit hook for running checkstyle on changed Java sources
#
# To use this you need:
# 1. checkstyle's jar file somewhere
# 2. a checkstyle XML check file somewhere
# 3. To configure git:
# * git config --add checkstyle.jar <location of jar>
# * git config --add checkstyle.checkfile <location of checkfile>