lib/pre-commit/checks.rb in pre-commit-0.1.9 vs lib/pre-commit/checks.rb in pre-commit-0.1.10

- old
+ new

@@ -4,10 +4,11 @@ require 'pre-commit/checks/tabs' require 'pre-commit/checks/console_log' require 'pre-commit/checks/debugger_check' require 'pre-commit/checks/jslint_check' require 'pre-commit/checks/jshint_check' +require 'pre-commit/checks/migration_check' class PreCommit WhiteSpace = lambda { WhiteSpaceChecker.check @@ -62,11 +63,12 @@ :js_lint_new => JslintCheck.new(:new), :jshint => JshintCheck.new, :debugger => DebuggerCheck, :tabs => Tabs, :closure_syntax_check => ClosureSyntaxCheck, - :merge_conflict => MergeConflict + :merge_conflict => MergeConflict, + :migrations => MigrationCheck.new } # Can not delete this method with out a deprecation strategy. # It is refered to in the generated pre-commit hook in versions 0.0-0.1.1 # @@ -80,10 +82,10 @@ # we want, and nobody is forced to update their pre-commit binary. def self.checks_to_run checks_to_run = `git config pre-commit.checks`.chomp.split(/,\s*/).map(&:to_sym) if checks_to_run.empty? - Checks.values_at(:white_space, :console_log, :debugger, :tabs, :jshint) + Checks.values_at(:white_space, :console_log, :debugger, :tabs, :jshint, :migrations) else Checks.values_at(*checks_to_run) end.compact end end