lib/face_control/checkers/rubocop.rb in face_control-0.8.3 vs lib/face_control/checkers/rubocop.rb in face_control-0.8.4
- old
+ new
@@ -59,11 +59,11 @@
text
end
def style_guide_url(offense)
cop_name = offense['cop_name']
- cop_config = ::RuboCop::ConfigLoader.default_configuration[cop_name] || {}
- cop_config['StyleGuide']
+ config = ::RuboCop::ConfigLoader.default_configuration
+ ::RuboCop::Cop::MessageAnnotator.new(config, config.for_cop(cop_name), {}).urls.first
end
def can_be_autocorrected?(offense)
!offense['corrected'].nil?
end