task :checkstyle do puts "[CHECKSTYLE] start task" begin Checkstyle::Reviewer.new( ENV['GIT_REPOSITORY'], ENV['RESULT_PATH'] || 'tmp/checkstyle.json' ).review rescue => e puts "[CHECKSTYLE][ERROR] #{e}" puts e.backtrace exit 1 end end