Skip to content
This repository was archived by the owner on Dec 24, 2025. It is now read-only.

Commit 70a6752

Browse files
committed
Integrated Rubocop to Rake
1 parent 8f5fc90 commit 70a6752

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

.rubocop.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
AllCops:
22
TargetRubyVersion: 3.0
3+
NewCops: enable
34

45
Exclude:
56
- "Gemfile"

Rakefile

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
require 'rdoc/task'
44
require 'rspec/core/rake_task'
5+
require 'rubocop/rake_task'
56

67
desc 'Generate document'
78
RDoc::Task.new do |opt|
@@ -13,26 +14,24 @@ RDoc::Task.new do |opt|
1314
opt.rdoc_files.include('lib/*.rb', 'lib/skynet/*.rb', 'EXAMPLES.md', 'README.md')
1415
end
1516

16-
desc 'Run rubocop'
17-
task :lint do
18-
`rubocop`
19-
end
17+
desc 'Lint with rubocop'
18+
RuboCop::RakeTask.new
2019

21-
desc 'Run rubocop with autofixable'
22-
task :autolint do
23-
`rubocop -a`
20+
desc 'with rubocop'
21+
RuboCop::RakeTask.new do |s|
22+
s.options = ['-a']
2423
end
2524

2625
desc 'Build gem'
2726
task :build do
2827
`gem build ruby-skynet.gemspec`
2928
end
3029

31-
desc 'Install gem'
32-
task :install do
33-
file = Dir.glob('ruby-skynet-*.gem').first
34-
`gem install ruby-skynet-#{file}.gem`
35-
end
30+
# desc 'Install gem'
31+
# task :install do
32+
# file = Dir.glob('ruby-skynet-*.gem').first
33+
# `gem install ruby-skynet-#{file}.gem`
34+
# end
3635

3736
desc 'Run tests'
3837
RSpec::Core::RakeTask.new do |test|

0 commit comments

Comments
 (0)