Class: Overcommit::GitHook::RussianNovel

Inherits:
HookSpecificCheck show all
Includes:
HookRegistry
Defined in:
lib/overcommit/plugins/commit_msg/russian_novel.rb

Constant Summary collapse

RUSSIAN_NOVEL_LENGTH =
30

Instance Method Summary collapse

Methods included from HookRegistry

included

Methods inherited from HookSpecificCheck

file_type, friendly_name, #initialize, #name, required!, #skip?, skippable?, #staged, stealth!, #stealth?

Constructor Details

This class inherits a constructor from Overcommit::GitHook::HookSpecificCheck

Instance Method Details

#run_checkObject



8
9
10
11
12
13
14
# File 'lib/overcommit/plugins/commit_msg/russian_novel.rb', line 8

def run_check
  if commit_message.length > RUSSIAN_NOVEL_LENGTH
    return :warn, 'You seem to have authored a Russian novel; congratulations!'
  end

  :good
end