Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor hooks, add opt-in pre-push hook. #363

Merged
merged 1 commit into from
Jul 6, 2015
Merged

Commits on Jul 6, 2015

  1. Refactor hooks, add opt-in pre-push hook.

    See hooks/README.md for implementation notes.
    
    Motivtion: the old hooks are hard to run manually, and code reuse among
    hooks is difficult. Goal of this refactor is to cleanly split the steps
    involved:
    
    - determine set of changed files
    - run checks on specific files
    - report issues based on check results
    
    The old logic was based on running checks on individual files, printing
    "1" on STDOUT for bad files. Now, check-* scripts take a list of files
    as args and print filenames of bad files on STDOUT. A toplevel "check"
    script drives these individual checks and contains common hook logic
    such as problem reporting.  The toplevel hooks themselves use the
    "check" script to take appropriate actions.
    
    Also change checks to use strict `-euo pipefail` error handling where
    possible, and standardize variable naming. (Uppercase for top-of-file
    constants or vars exported to the environment, otherwise lowercase.)
    klausw committed Jul 6, 2015
    Configuration menu
    Copy the full SHA
    d6c5761 View commit details
    Browse the repository at this point in the history