class Overcommit::Hook::PreCommit::FixMe

Check for “token” strings

Public Instance Methods

run() click to toggle source
# File lib/overcommit/hook/pre_commit/fix_me.rb, line 6
def run
  keywords = config['keywords']
  result = execute(command, args: [keywords.join('|')] + applicable_files)

  extract_messages(
    result.stdout.split("\n"),
    /^(?<file>(?:\w:)?[^:]+):(?<line>\d+)/,
    lambda { |_type| :warning }
  )
end