1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-23 08:25:58 +01:00

Starting to enforce our coding style. The first step is that we’ve pulled in Rubocop to check out Ruby syntax. There is likely a bit of customization to do yet AND there is definitely that backlog of todo’s that we just told it to ignore.

This commit is contained in:
Mark VanderVoord
2017-03-28 08:44:32 -04:00
parent 550d58ba2d
commit 3062c39725
18 changed files with 1414 additions and 910 deletions

View File

@@ -53,7 +53,7 @@ task :summary do
end
desc "Build and test Unity"
task :all => [:clean, :prepare_for_tests, :scripts, :unit, :summary]
task :all => [:clean, :prepare_for_tests, :scripts, :unit, :style, :summary]
task :default => [:clobber, :all]
task :ci => [:no_color, :default]
task :cruise => [:no_color, :default]
@@ -70,3 +70,25 @@ end
task :verbose do
$verbose = true
end
namespace :style do
desc "Check style"
task :check do
`rubocop ../`
report "Style Checked."
end
desc "Attempt to Autocorrect style"
task :auto do
`rubocop ../ --auto-correct`
report "Autocorrected What We Could."
end
desc "Update style todo list"
task :todo do
`rubocop ../ --auto-gen-config`
report "Updated Style TODO List."
end
end
task :style => ['style:check']