version control - SVN JSHint Hook? -


i have been searching in google , on here have not found relavant answer. project working on using svn. question have wondering if has implemented pre-commit hook stop check in if jshint fails?

thank has experience doing this.

i not make pre-commit hook because of length of time jshint takes. when commit, they'll have wait jshint complete , wait verdict.

remember subversion hooks run on server , not client's machine. means pre-commit hook has checkout, , run jshint. if takes 30 seconds perform, it's 30 seconds developer sitting there waiting commit finish , having hatred you, company, , subversion grow. plus, if happens hook causes fail, you'll have debug , fix while developers unable commit code.

your developers grow hate , subversion , may take step of setting own source repository. i've seen done in days when clearcase ruled , subversion first created. developers setup own repository subversion (since easy do) , stopped using corporate clearcase repository.

instead of pre-commit hook, use continuous build engine jenkins.

when commit, jenkins checkout, , run whatever tools need (like running jshint). later on, might want expand tools want use. can have jenkins create deployable artifact (like zipfile). jenkins gather history, show changes between commits, , let know did changes.

but, ask, without pre-commit hook, won't developers able check in code causes jshint fail?

yes, can. however, can configure jenkins notify , developers when happens. since version control, it's easy have developer fix issue or undo commit.

the trick shame developer broke build. stockades , supply of overripe tomatoes good. dunce cap , big sign says "i broke build" work. maybe big scarlet b build sewn onto clothes.

actually, developers naturally not want break build. makes them bad , unprofessional. developers habit of running jshint before commit want happen.


Comments

Popular posts from this blog

tcpdump - How to check if server received packet (acknowledged) -