lib/rubocop/cop/rbs/lint/top_level_interface.rb in rubocop-on-rbs-1.2.0 vs lib/rubocop/cop/rbs/lint/top_level_interface.rb in rubocop-on-rbs-1.3.0
- old
+ new
@@ -33,9 +33,10 @@
end
alias on_rbs_module on_rbs_class
def on_rbs_interface(decl)
return unless @last_end_pos.nil? || (@last_end_pos < decl.location.start_pos)
+ return unless decl.name.namespace.path.empty?
range = location_to_range(decl.location)
add_offense(range)
end
end