Method: RuboCop::Formatter::OffenseCountFormatter#cop_information
- Defined in:
- lib/rubocop/formatter/offense_count_formatter.rb
#cop_information(cop_name) ⇒ Object
81 82 83 84 85 86 87 88 89 90 |
# File 'lib/rubocop/formatter/offense_count_formatter.rb', line 81 def cop_information(cop_name) cop = RuboCop::Cop::Registry.global.find_by_cop_name(cop_name).new if cop.correctable? safety = cop.safe_autocorrect? ? 'Safe' : 'Unsafe' correctable = Rainbow(" [#{safety} Correctable]").yellow end "#{cop_name}#{correctable}#{@style_guide_links[cop_name]}" end |