Skip to content
Snippets Groups Projects
Commit 3b1182b4 authored by David Baumgold's avatar David Baumgold
Browse files

Merge pull request #332 from edx/db/rake-pylint

Refactor rake tasks for pylint/pep8
parents 2eb89d05 7bf2b1e3
No related merge requests found
......@@ -20,26 +20,26 @@ end
report_dir = report_dir_path(system)
directory report_dir
desc "Run pep8 on all #{system} code"
task "pep8_#{system}" => [report_dir, :install_python_prereqs] do
sh("pep8 #{system} | tee #{report_dir}/pep8.report")
end
task :pep8 => "pep8_#{system}"
namespace :pylint do
namespace system do
desc "Run pylint checking for #{system} checking for errors only, and aborting if there are any"
task :errors do
run_pylint(system, report_dir, '-E')
end
end
desc "Run pylint on all #{system} code"
task "pylint_#{system}" => [report_dir, :install_python_prereqs] do
run_pylint(system, report_dir)
end
namespace "pylint_#{system}" do
desc "Run pylint checking for errors only, and aborting if there are any"
task :errors do
run_pylint(system, report_dir, '-E')
desc "Run pylint on all #{system} code"
task system => [report_dir, :install_python_prereqs] do
run_pylint(system, report_dir)
end
end
namespace :pylint do
task :errors => "pylint_#{system}:errors"
end
task :pylint => "pylint_#{system}"
task :pylint => :"pylint:#{system}"
end
\ No newline at end of file
namespace :pep8 do
desc "Run pep8 on all #{system} code"
task system => [report_dir, :install_python_prereqs] do
sh("pep8 #{system} | tee #{report_dir}/pep8.report")
end
end
task :pep8 => :"pep8:#{system}"
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment