Experiences With Pre Commit Hooks

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    1 Favorite

    Experiences With Pre Commit Hooks - Presentation Transcript

    1. PHP Unconference 09 Thomas Weinert Practical Experiences With Pre-Commit Hooks
    2. 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/*
    9. Screenshot: Coding Style Error
    10. Parse Error Sniff ● php -l ● ext/pcntl ● Input/output streams
    11. Screenshot: Parse Error
    12. Commit Message Check ● Kore Nordmann for Arbit(Tracker) ● Connect revision control system to bug tracker ● Readability ● Can not check contents
    13. Screenshot: Bad Message
    14. Rules ● - keyword (ticket): description ● # comment ● Maximum line length
    15. Sample
    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
    18. Screenshot: Fisheye
    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
    20. Screenshot: Mantis 1.2

    + Thomas WeinertThomas Weinert, 2 months ago

    custom

    248 views, 1 favs, 0 embeds more stats

    Slides from PHP Unconference 09 in Hamburg

    More info about this document

    CC Attribution License

    Go to text version

    • Total Views 248
      • 248 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 1
    • Downloads 0
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories

    Tags