From a12d6b9c7950a2bde1e452285fd8cf8955cfc726 Mon Sep 17 00:00:00 2001 From: Jerome Dalbert Date: Sun, 27 Oct 2024 13:06:24 -0700 Subject: [PATCH] Improve documentation wording and formatting --- lib/rubocop/cop/obsession/method_order.rb | 3 ++- .../cop/obsession/rails/fully_defined_json_field.rb | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/rubocop/cop/obsession/method_order.rb b/lib/rubocop/cop/obsession/method_order.rb index 4d60634..aeface3 100644 --- a/lib/rubocop/cop/obsession/method_order.rb +++ b/lib/rubocop/cop/obsession/method_order.rb @@ -3,7 +3,8 @@ module RuboCop module Cop module Obsession - # This cop checks for private/protected methods that are not ordered correctly. + # This cop checks for private/protected methods that are not ordered + # correctly. It supports autocorrect. # # Code should read from top to bottom: methods should be defined in the # same order as the order when they are first mentioned. diff --git a/lib/rubocop/cop/obsession/rails/fully_defined_json_field.rb b/lib/rubocop/cop/obsession/rails/fully_defined_json_field.rb index 4c6596d..09f310e 100644 --- a/lib/rubocop/cop/obsession/rails/fully_defined_json_field.rb +++ b/lib/rubocop/cop/obsession/rails/fully_defined_json_field.rb @@ -8,12 +8,12 @@ module Rails # defaults or comments. # # - json(b) fields should have a default value like {} or [] so code can - # do my_field['field'] or my_field.first without fear that my_field is - # nil. + # do my_field['field'] or my_field.first without fear that my_field is + # nil. # - It is impossible to know the structure of a json(b) field just by - # reading the schema, because json(b) is an unstructured type. That's why - # an "Example: ..." Postgres comment should always be present when - # defining the field. + # reading the schema, because json(b) is an unstructured type. That's why + # an "Example: ..." Postgres comment should always be present when + # defining the field. # # @example #