lib/face_control/checkers/rubocop.rb in face_control-0.8.5 vs lib/face_control/checkers/rubocop.rb in face_control-0.8.6
- old
+ new
@@ -50,24 +50,16 @@
if (link = style_guide_url(offense))
text << " — [Guide](#{link})"
end
- if can_be_autocorrected?(offense)
- text << " (Run `rubocop -a #{file['path']}` to fix.)"
- end
-
- text
+ text << " — #{offense['cop_name']}"
end
def style_guide_url(offense)
cop_name = offense['cop_name']
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?
+ ::RuboCop::Cop::MessageAnnotator.new(config, cop_name, config.for_cop(cop_name), {}).urls.first
end
end
end
end