Coder Social home page Coder Social logo

svn-precommit-hook's Introduction

SVN Pre-Commit Hook

Why:

  • For Maven projects, the original dbdata validation rules no longer apply
  • For future client/partner enablement, class-level obfuscation is mandatory
  • Pre-commit code review is common practice, and hook should be capable of validating log messages
  • At the age of JDK1.7 and above, legacy codes should be obsolete (ojdbc14 should also be replaced)

Build:

  • mvn clean package
  • mvn clean package -Pobfuscate (for class-level obfuscation)

Run:

  • Linux:
    • java -Djava.security.egd=file:///dev/urandom -jar svn-precommit-hook.jar "$1" "$2"
  • Windows:
    • java -jar svn-precommit-hook.jar "%1" "%2"

Optional Parameters:

  • --superusers (you know what this means)

  • --allowable-statuses (the default allowable check-in statuses are Opened, Reopened and Active, which can be overridden with this parameter)

    • e.g: --allowable-statuses=Opened,Reopened,Active,Doing
  • --forbidden-suffixes (files with specified suffixes will be disallowed for check-in)

    • e.g: --forbidden-suffixes=jar,tar,zip
  • --file-size-limit (files exceeding the maximum size limit will be rejected for check-in)

    • e.g: --file-size-limit=20M
  • --no-check-db (suppress dbdata validation, so that you are on your own now)

  • --no-check-naming (suppress naming validation [whitespaces])

  • --check-log-message (thus commit messages must specify "What" and "Reviewed By" information)

    • e.g: after applying, the commit messages will look like below:
    [artf12306] Please fix the unbearable verification codes a.s.a.p
    
    What: Nobody wants to distinguish between chick's eggs and duck's eggs
    Reviewed By: Jesus Christ
    

svn-precommit-hook's People

Contributors

andreyhsiao avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.