Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

…lines 1–6 unchanged (6 lines)
7module RuboCop
8 module Cop
9 module FormulaAudit
10 # This cop audits `url`s and `mirror`s in formulae.
11 class Urls < FormulaCop
12 include UrlHelper
13
14 sig { override.params(formula_nodes: FormulaNodes).void }
15 def audit_formula(formula_nodes)
16 return if (body_node = formula_nodes.body_node).nil?
17
18 urls = find_every_func_call_by_name(body_node, :url)
19 mirrors = find_every_func_call_by_name(body_node, :mirror)
…lines 20–169 unchanged (150 lines)

After

…lines 1–6 unchanged (6 lines)
7module RuboCop
8 module Cop
9 module FormulaAudit
10 # This cop audits `url`s and `mirror`s in formulae.
11 class Urls < FormulaCop
12 include UrlHelper
13 extend AutoCorrector
14
15 sig { override.params(formula_nodes: FormulaNodes).void }
16 def audit_formula(formula_nodes)
17 return if (body_node = formula_nodes.body_node).nil?
18
19 urls = find_every_func_call_by_name(body_node, :url)
…lines 20–170 unchanged (151 lines)

Before

program
comment "# typed: strict"
comment "# frozen_string_literal: true"
call
identifier "require"
argument_list
string
" "\""
string_content "rubocops/extend/formula_cop"
" "\""
call
identifier "require"
argument_list
string
" "\""
string_content "rubocops/shared/url_helper"
" "\""
module
module "module"
constant "RuboCop"
body_statement
module
module "module"
constant "Cop"
body_statement
module
module "module"
constant "FormulaAudit"
comment "# This cop audits `url`s and `mirror`s in formulae."
body_statement
class
class "class"
constant "Urls"
superclass
< "<"
constant "FormulaCop"
body_statement
call
identifier "include"
argument_list
constant "UrlHelper"
call
identifier "sig"
block
{ "{"
block_body
call
call
identifier "override"
. "."
identifier "params"
argument_list
( "("
pair
hash_key_symbol "formula_nodes"
: ":"
constant "FormulaNodes"
) ")"
. "."
identifier "void"
} "}"
method (+254 nodes collapsed)
end "end"
comment "# This cop makes sure that `url`s use HTTPS."
class (+302 nodes collapsed)
comment "# This cop makes sure that the correct format for PyPI URLs "...
class (+258 nodes collapsed)
comment "# This cop makes sure that git URLs have a `revision`."
class (+153 nodes collapsed)
end "end"
module (+159 nodes collapsed)
end "end"
end "end"

After

program
comment "# typed: strict"
comment "# frozen_string_literal: true"
call
identifier "require"
argument_list
string
" "\""
string_content "rubocops/extend/formula_cop"
" "\""
call
identifier "require"
argument_list
string
" "\""
string_content "rubocops/shared/url_helper"
" "\""
module
module "module"
constant "RuboCop"
body_statement
module
module "module"
constant "Cop"
body_statement
module
module "module"
constant "FormulaAudit"
comment "# This cop audits `url`s and `mirror`s in formulae."
body_statement
class
class "class"
constant "Urls"
superclass
< "<"
constant "FormulaCop"
body_statement
call
identifier "include"
argument_list
constant "UrlHelper"
call
identifier "extend"
argument_list
constant "AutoCorrector"
call
identifier "sig"
block
{ "{"
block_body
call
call
identifier "override"
. "."
identifier "params"
argument_list
( "("
pair
hash_key_symbol "formula_nodes"
: ":"
constant "FormulaNodes"
) ")"
. "."
identifier "void"
} "}"
method (+254 nodes collapsed)
end "end"
comment "# This cop makes sure that `url`s use HTTPS."
class (+302 nodes collapsed)
comment "# This cop makes sure that the correct format for PyPI URLs "...
class (+258 nodes collapsed)
comment "# This cop makes sure that git URLs have a `revision`."
class (+153 nodes collapsed)
end "end"
module (+159 nodes collapsed)
end "end"
end "end"