add TODOs for future refactoring

This commit is contained in:
Rylan Polster 2020-07-10 15:07:28 -04:00
parent a720d45bd0
commit 69e89d7a01
2 changed files with 2 additions and 0 deletions

View File

@ -118,6 +118,7 @@ module RuboCop
depends_on_build_regex = /depends_on .+ (if build\.with(out)?\?\(["']\w+["']\))/
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)
problem "Use `:optional` or `:recommended` instead of `#{match[1]}`"

View File

@ -112,6 +112,7 @@ module RuboCop
parent = n.parent
# 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))["'/]}
if match = parent.source.match(prefix_keyword_regex)
offending_node(parent)