Skip to content

Instantly share code, notes, and snippets.

@GROX13
GROX13 / Checkstyle pre-commit hook
Created April 8, 2016 07:38 — forked from gkzhong/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>