add TODOs for future refactoring
This commit is contained in:
parent
a720d45bd0
commit
69e89d7a01
@ -118,6 +118,7 @@ module RuboCop
|
|||||||
depends_on_build_regex = /depends_on .+ (if build\.with(out)?\?\(["']\w+["']\))/
|
depends_on_build_regex = /depends_on .+ (if build\.with(out)?\?\(["']\w+["']\))/
|
||||||
|
|
||||||
find_instance_method_call(body_node, :build, :with?) do |n|
|
find_instance_method_call(body_node, :build, :with?) do |n|
|
||||||
|
# TODO: this should be refactored to a direct method match
|
||||||
next unless match = n.parent.source.match(depends_on_build_regex)
|
next unless match = n.parent.source.match(depends_on_build_regex)
|
||||||
|
|
||||||
problem "Use `:optional` or `:recommended` instead of `#{match[1]}`"
|
problem "Use `:optional` or `:recommended` instead of `#{match[1]}`"
|
||||||
|
|||||||
@ -112,6 +112,7 @@ module RuboCop
|
|||||||
|
|
||||||
parent = n.parent
|
parent = n.parent
|
||||||
# Only look at keywords that have `prefix` before them
|
# Only look at keywords that have `prefix` before them
|
||||||
|
# TODO: this should be refactored to a direct method match
|
||||||
prefix_keyword_regex = %r{(prefix\s*\+\s*["'](bin|include|libexec|lib|sbin|share|Frameworks))["'/]}
|
prefix_keyword_regex = %r{(prefix\s*\+\s*["'](bin|include|libexec|lib|sbin|share|Frameworks))["'/]}
|
||||||
if match = parent.source.match(prefix_keyword_regex)
|
if match = parent.source.match(prefix_keyword_regex)
|
||||||
offending_node(parent)
|
offending_node(parent)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user