Mais conteúdo relacionado Semelhante a Experiences With Pre Commit Hooks (20) Mais de Thomas Weinert (13) Experiences With Pre Commit Hooks2. About Me
● Application Developer
– PHP
– XSLT/XPath
– Javascript
● papaya CMS
– PHP based Content Management System
– uses XSLT for Templates
3. SVN Hooks
● Shell scripts on server
● For each repository
● Several events
– Pre-/Post-Commit
4. Pre-Commit
● Before Commit
● Transaction
● Standard error goes to SVN client
● Return value != 0 blocks commit
5. PHPCodeSniffer
● Ensure coding style
● Block parse errors (Lint)
● Ensure licence infos
6. Reaction
● Anger
● Acceptance
● Happyness
● Request for more sniffs
– Rules that are not checked are ignored
7. SVNLook
– On repository
– Read only
– Revision or transaction
8. papaya Custom Hook
● Calls PHPCodeSniffer only once
● Streamwrapper for SVNLook
● Uses XML response
● Outputs detailed error informations for each file
● Exclude: */external/*
12. Commit Message Check
● Kore Nordmann for Arbit(Tracker)
● Connect revision control system to bug tracker
● Readability
● Can not check contents
14. Rules
● - keyword (ticket): description
● # comment
● Maximum line length
16. Reactions
● Rejection and acceptance
● Syntax flame war
● Keyword flame war
● Line break flame war
● Increasing quality
17. Result
● Two additional keywords for documentation
team
● Line break suggestions
19. Mantis
● 1.1
– Several commit hooks for actions in Mantis
– Commits as comments
● 1.2
– Source browser plugin (WebSVN)
– Connects change sets to tickets