Skip to content

Instantly share code, notes, and snippets.

@hyoshida
Last active August 29, 2015 14:01
Show Gist options
  • Save hyoshida/ae2790259bf33028a28a to your computer and use it in GitHub Desktop.
Save hyoshida/ae2790259bf33028a28a to your computer and use it in GitHub Desktop.
code_hunter を実行し、改善事項がある場合は終了ステータスに 1 を返す
# code_hunter: https://github.com/r7kamura/code_hunter
task :code_hunter do
report_yaml = `code_hunter --application-path=#{Rails.root}`
successed_flag = YAML.load(report_yaml).empty?
puts "\e[31m#{report_yaml}\e[0m" unless successed_flag
exit successed_flag
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment