lib/rubocop/git/runner.rb in rubocop-git-kjanoudi-0.1.2 vs lib/rubocop/git/runner.rb in rubocop-git-kjanoudi-0.1.3
- old
+ new
@@ -7,19 +7,12 @@
def run(options)
options = Options.new(options) unless options.is_a?(Options)
@options = options
@files = DiffParser.parse(git_diff(options))
- 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(options))
-
display_violations($stdout)
- #removes comments after rubocop processing
- rubo_comment.remove_comments
exit(1) if violations.any?
end
private
@@ -50,10 +43,10 @@
end
def display_violations(io)
formatter = RuboCop::Formatter::ClangStyleFormatter.new(io)
formatter.started(nil)
-
+
violations.map do |violation|
formatter.file_finished(
violation.filename,
violation.offenses.compact.sort.freeze
)