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 8560e81
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions rdjson_formatter/rdjson_formatter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ 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 8560e81

Please sign in to comment.