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:
@@ -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']
|
||||
|
||||
Reference in New Issue
Block a user