#!/usr/bin/env ruby require 'json' `grep -rPIHni 'todo' src/* include/* samples/*`.lines { |line| if /(?.+(hpp|cpp|chai)):(?[0-9]+):(?.+)/ =~ line puts(JSON.dump({:line => linenumber, :filename => filename, :tool => "todo_checker", :message => "todo: #{restofline.strip}", :messagetype => "info"})) end }