Skip to content

Commit

Permalink
Merge pull request rubocop#75 from koic/fix_a_build_error
Browse files Browse the repository at this point in the history
Fix a build error
  • Loading branch information
koic authored Jun 18, 2019
2 parents a6a1a46 + 7bb28ab commit dff04bd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ Naming/PredicateName:
- def_node_matcher
- def_node_search

Rails:
Enabled: false

Style/FormatStringToken:
# Because we parse a lot of source codes from strings. Percent arrays
# look like unannotated format string tokens to this cop.
Expand Down
12 changes: 8 additions & 4 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ rescue Bundler::BundlerError => e
exit e.status_code
end

require 'rubocop/rake_task'
require 'rspec/core/rake_task'

RSpec::Core::RakeTask.new(:spec) do |spec|
Expand All @@ -25,16 +26,19 @@ task :coverage do
Rake::Task['spec'].execute
end

desc 'Run RuboCop over this gem'
task :internal_investigation do
sh('bundle exec rubocop')
desc 'Run RuboCop over itself'
RuboCop::RakeTask.new(:internal_investigation).tap do |task|
if RUBY_ENGINE == 'ruby' &&
RbConfig::CONFIG['host_os'] !~ /mswin|msys|mingw|cygwin|bccwin|wince|emc/
task.options = %w[--parallel]
end
end

task default: %i[
internal_investigation
documentation_syntax_check
generate_cops_documentation
spec
internal_investigation
]

desc 'Generate a new cop template'
Expand Down

0 comments on commit dff04bd

Please sign in to comment.