Reduce cyclomatic complexity of Gitlab::UrlBlocker.validate!
The following discussion from !24047 (merged) should be addressed:
-
@smcgivern started a discussion: (+2 comments) lib/gitlab/url_blocker.rb:11:7: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for validate! is too high. [14/13] def validate!(url, ports: [], protocols: [], allow_localhost: false, allow_local_network: true, ascii_only: false, enforce_user: false, enforce_sanitization: false) ...
I'm inclined to agree, but I don't think we should fix that in this MR. Can we create an issue in 11.8 to fix this?