tasks/cops_documentation.rake in rubocop-sorbet-0.7.0 vs tasks/cops_documentation.rake in rubocop-sorbet-0.7.1

- old
+ new

@@ -44,16 +44,19 @@ NOTE end def properties(config, cop) header = [ - "Enabled by default", "Safe", "Supports autocorrection", "VersionAdded", - "VersionChanged" + "Enabled by default", + "Safe", + "Supports autocorrection", + "VersionAdded", + "VersionChanged", ] config = config.for_cop(cop) safe_auto_correct = config.fetch("SafeAutoCorrect", true) - autocorrect = if cop.new.support_autocorrect? + autocorrect = if cop.support_autocorrect? "Yes #{"(Unsafe)" unless safe_auto_correct}" else "No" end content = [[ @@ -190,11 +193,19 @@ end end def print_cop_with_doc(cop, config) t = config.for_cop(cop) - non_display_keys = ["Description", "Enabled", "StyleGuide", "Reference", "Safe", "SafeAutoCorrect", "VersionAdded", - "VersionChanged"] + non_display_keys = [ + "Description", + "Enabled", + "StyleGuide", + "Reference", + "Safe", + "SafeAutoCorrect", + "VersionAdded", + "VersionChanged", + ] pars = t.reject { |k| non_display_keys.include?(k) } description = "No documentation" examples_object = [] YARD::Registry.all(:class).detect do |code_object| next unless RuboCop::Cop::Badge.for(code_object.to_s) == cop.badge