Skip to content

Commit

Permalink
Skip global offense that does not have any location
Browse files Browse the repository at this point in the history
  • Loading branch information
ohbarye committed Nov 18, 2021
1 parent d4bc52b commit c609128
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rdjson_formatter/rdjson_formatter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ def started(_target_files)

def file_finished(file, offenses)
offenses.each do |offense|
next if offense.location == RuboCop::Cop::Offense::NO_LOCATION

@rdjson[:diagnostics] << build_diagnostic(file, offense)
end
end
Expand Down

0 comments on commit c609128

Please sign in to comment.