File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,5 +11,5 @@ gem install rubocop-chromebrew
1111## Usage
1212
1313```
14- rubocop --require rubocop-chromebrew
14+ rubocop --plugin rubocop-chromebrew
1515```
Original file line number Diff line number Diff line change 11require 'rubocop'
22
33require_relative 'rubocop/chromebrew'
4- require_relative 'rubocop/chromebrew/inject'
5-
6- RuboCop ::Chromebrew ::Inject . defaults!
4+ require_relative 'rubocop/chromebrew/plugin'
75
86require_relative 'rubocop/cop/chromebrew_cops'
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ require 'lint_roller'
2+
3+ module RuboCop
4+ module Chromebrew
5+ class Plugin < LintRoller ::Plugin
6+ def about
7+ LintRoller ::About . new (
8+ name : 'rubocop-chromebrew' ,
9+ version : '0.0.4' ,
10+ homepage : 'https://github.com/chromebrew/rubocop-chromebrew' ,
11+ description : 'A RuboCop extension for Chromebrew-specific practices.'
12+ )
13+ end
14+
15+ def supported? ( context )
16+ context . engine == :rubocop
17+ end
18+
19+ def rules ( _context )
20+ LintRoller ::Rules . new (
21+ type : :path ,
22+ config_format : :rubocop ,
23+ value : Pathname . new ( __dir__ ) . join ( '../../../config/default.yml' )
24+ )
25+ end
26+ end
27+ end
28+ end
Original file line number Diff line number Diff line change @@ -7,8 +7,11 @@ Gem::Specification.new do |spec|
77 spec . email = 'creatorsmithmdt@gmail.com'
88 spec . homepage = 'https://github.com/chromebrew/rubocop-chromebrew'
99
10+ spec . metadata [ 'default_lint_roller_plugin' ] = 'RuboCop::Chromebrew::Plugin'
11+
1012 spec . files = `git ls-files` . split ( "\n " )
1113 spec . require_paths = [ 'lib' ]
1214
15+ spec . add_dependency 'lint_roller'
1316 spec . add_runtime_dependency 'rubocop'
1417end
You can’t perform that action at this time.
0 commit comments