forked from rubocop/rubocop-rake
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplugin.rb
More file actions
31 lines (27 loc) · 752 Bytes
/
plugin.rb
File metadata and controls
31 lines (27 loc) · 752 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# frozen_string_literal: true
require 'lint_roller'
module RuboCop
module Rake
# A plugin that integrates RuboCop Rake with RuboCop's plugin system.
class Plugin < LintRoller::Plugin
def about
LintRoller::About.new(
name: 'rubocop-rake',
version: Version::STRING,
homepage: 'https://github.com/rubocop/rubocop-rake',
description: 'A RuboCop plugin for Rake.',
)
end
def supported?(context)
context.engine == :rubocop
end
def rules(_context)
LintRoller::Rules.new(
type: :path,
config_format: :rubocop,
value: Pathname.new(__dir__).join('../../../config/default.yml'),
)
end
end
end
end