From 6bd3dbe00195ae421244e9a86711b0151e0968ea Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Wed, 19 Aug 2020 07:26:09 +0200 Subject: [PATCH] Document `Style`. --- Library/Homebrew/style.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Library/Homebrew/style.rb b/Library/Homebrew/style.rb index be40a4dd41..36f538b158 100644 --- a/Library/Homebrew/style.rb +++ b/Library/Homebrew/style.rb @@ -1,6 +1,9 @@ # frozen_string_literal: true module Homebrew + # Helper module for running RuboCop. + # + # @api private module Style module_function @@ -127,6 +130,7 @@ module Homebrew rubocop_success && shellcheck_success end + # Result of a RuboCop run. class RubocopResults def initialize(json) @metadata = json["metadata"] @@ -144,6 +148,7 @@ module Homebrew end end + # A RuboCop offense. class RubocopOffense attr_reader :severity, :message, :corrected, :location, :cop_name @@ -177,6 +182,7 @@ module Homebrew end end + # Source location of a RuboCop offense. class RubocopLineLocation attr_reader :line, :column, :length