Class: RuboCop::Git::Runner
- Inherits:
-
Object
- Object
- RuboCop::Git::Runner
- Defined in:
- lib/rubocop/git/runner.rb
Overview
Instance Method Summary collapse
Instance Method Details
#run(options) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/rubocop/git/runner.rb', line 7 def run() = Options.new() unless .is_a?(Options) @options = @files = DiffParser.parse(git_diff()) rubo_comment = RuboComment.new(@files) #adds comments to files and reparses diff after changes are made rubo_comment.add_comments @files = DiffParser.parse(git_diff()) display_violations($stdout) #removes comments after rubocop processing rubo_comment.remove_comments exit(1) if violations.any? end |