From 1d966a2a4eef531dfe26e6cc8685be65295c2b30 Mon Sep 17 00:00:00 2001 From: Jason Garber Date: Mon, 8 Jan 2024 15:16:41 -0500 Subject: [PATCH] Add more inline comments/documentation --- config/rubocop-layout.yml | 5 +++++ config/rubocop-lint.yml | 4 ++++ config/rubocop-metrics.yml | 5 +++++ config/rubocop-naming.yml | 5 +++++ config/rubocop-performance.yml | 7 +++++++ config/rubocop-rake.yml | 5 +++++ config/rubocop-style.yml | 5 +++++ config/rubocop.yml | 7 +++++++ 8 files changed, 43 insertions(+) diff --git a/config/rubocop-layout.yml b/config/rubocop-layout.yml index d23c2dc..60a7ccf 100644 --- a/config/rubocop-layout.yml +++ b/config/rubocop-layout.yml @@ -1,3 +1,8 @@ +# Layout cops inspect your code for consistent use of indentation, alignment, +# and white space. +# +# @see https://docs.rubocop.org/rubocop/cops_layout.html + Layout/ClassStructure: Enabled: true ExpectedOrder: diff --git a/config/rubocop-lint.yml b/config/rubocop-lint.yml index 2474500..dcec651 100644 --- a/config/rubocop-lint.yml +++ b/config/rubocop-lint.yml @@ -1,2 +1,6 @@ +# Lint cops check for ambiguities and possible errors in your code. +# +# @see https://docs.rubocop.org/rubocop/cops_lint.html + Lint/HeredocMethodCallPosition: Enabled: true diff --git a/config/rubocop-metrics.yml b/config/rubocop-metrics.yml index 6ff50ef..2b1c5d1 100644 --- a/config/rubocop-metrics.yml +++ b/config/rubocop-metrics.yml @@ -1,3 +1,8 @@ +# Metrics cops deal with properties of the source code that can be measured, +# such as class length, method length, etc. +# +# @see https://docs.rubocop.org/rubocop/cops_metrics.html + Metrics/BlockLength: CountAsOne: - array diff --git a/config/rubocop-naming.yml b/config/rubocop-naming.yml index 8475efc..e38289a 100644 --- a/config/rubocop-naming.yml +++ b/config/rubocop-naming.yml @@ -1,3 +1,8 @@ +# Naming cops check for naming issue of your code, such as method name, constant +# name, file name, etc. +# +# @see https://docs.rubocop.org/rubocop/cops_naming.html + Naming/InclusiveLanguage: Enabled: true diff --git a/config/rubocop-performance.yml b/config/rubocop-performance.yml index 0b99b8d..1e88f6d 100644 --- a/config/rubocop-performance.yml +++ b/config/rubocop-performance.yml @@ -1,3 +1,10 @@ +# A collection of RuboCop cops to check for performance optimizations in Ruby +# code. +# +# @see https://rubygems.org/gems/rubocop-performance +# @see https://docs.rubocop.org/rubocop-performance +# @see https://github.com/rubocop/rubocop-performance + require: rubocop-performance Performance/ChainArrayAllocation: diff --git a/config/rubocop-rake.yml b/config/rubocop-rake.yml index 9335893..f904777 100644 --- a/config/rubocop-rake.yml +++ b/config/rubocop-rake.yml @@ -1 +1,6 @@ +# A RuboCop plugin for Rake. +# +# @see https://rubygems.org/gems/rubocop-rake +# @see https://github.com/rubocop/rubocop-rake + require: rubocop-rake diff --git a/config/rubocop-style.yml b/config/rubocop-style.yml index 925071e..a44f386 100644 --- a/config/rubocop-style.yml +++ b/config/rubocop-style.yml @@ -1,3 +1,8 @@ +# Style cops check for stylistic consistency of your code. Many of the them are +# based on the Ruby Style Guide. +# +# @see https://docs.rubocop.org/rubocop/cops_style.html + Style/ArrayCoercion: Enabled: true diff --git a/config/rubocop.yml b/config/rubocop.yml index 5a10add..30bd9a4 100644 --- a/config/rubocop.yml +++ b/config/rubocop.yml @@ -1,3 +1,10 @@ +# RuboCop is a Ruby code style checking and code formatting tool. It aims to +# enforce the community-driven Ruby Style Guide. +# +# @see https://rubygems.org/gems/rubocop +# @see https://docs.rubocop.org/rubocop +# @see https://github.com/rubocop/rubocop + inherit_from: - ./rubocop-layout.yml - ./rubocop-lint.yml