Document Style.
This commit is contained in:
parent
735b744369
commit
6bd3dbe001
@ -1,6 +1,9 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Homebrew
|
module Homebrew
|
||||||
|
# Helper module for running RuboCop.
|
||||||
|
#
|
||||||
|
# @api private
|
||||||
module Style
|
module Style
|
||||||
module_function
|
module_function
|
||||||
|
|
||||||
@ -127,6 +130,7 @@ module Homebrew
|
|||||||
rubocop_success && shellcheck_success
|
rubocop_success && shellcheck_success
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Result of a RuboCop run.
|
||||||
class RubocopResults
|
class RubocopResults
|
||||||
def initialize(json)
|
def initialize(json)
|
||||||
@metadata = json["metadata"]
|
@metadata = json["metadata"]
|
||||||
@ -144,6 +148,7 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# A RuboCop offense.
|
||||||
class RubocopOffense
|
class RubocopOffense
|
||||||
attr_reader :severity, :message, :corrected, :location, :cop_name
|
attr_reader :severity, :message, :corrected, :location, :cop_name
|
||||||
|
|
||||||
@ -177,6 +182,7 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Source location of a RuboCop offense.
|
||||||
class RubocopLineLocation
|
class RubocopLineLocation
|
||||||
attr_reader :line, :column, :length
|
attr_reader :line, :column, :length
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user