summaryrefslogtreecommitdiff
path: root/tasks/rubocop.rake
blob: a511e380e0a453d063f7f59ea9dcf7e465ace117 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# frozen_string_literal: true

begin
  require 'rubocop/rake_task'
  RuboCop::RakeTask.new :lint do |t|
    t.patterns = Dir['lib/**/*.rb'] - ['lib/asciidoctor/pdf/formatted_text/parser.rb'] + %w(Gemfile Rakefile bin/* spec/**/*.rb tasks/*.rake)
  end
rescue LoadError => e
  task :lint do
    raise <<~'EOS', cause: e
    Failed to load lint task.
    Install required gems using: bundle --path=.bundle/gems
    Next, invoke Rake using: bundle exec rake
    EOS
  end
end