From 5de4b4ef14435ddc711f301f2b4ba9e0ec242a8c Mon Sep 17 00:00:00 2001 From: David Baumgold Date: Wed, 3 Jul 2013 14:50:56 -0400 Subject: [PATCH] Refactor rake tasks for pylint/pep8 Split components with : instead of _ --- rakelib/quality.rake | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/rakelib/quality.rake b/rakelib/quality.rake index 927f765eb5..55732f10d4 100644 --- a/rakelib/quality.rake +++ b/rakelib/quality.rake @@ -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 do + run_pylint(system, report_dir) end end - namespace :pylint do - task :errors => "pylint_#{system}:errors" + task :pylint => :"pylint:#{system}" + + 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 :pylint => "pylint_#{system}" - -end \ No newline at end of file + task :pep8 => :"pep8:#{system}" +end