Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Lint/UriRegexp misses common usecase of URI.regexp #7834
In #4694 the Lint/UriRegexp cop was introduced, and tests were added for two cases:
However, a common argument passed to URI.regexp is an array of schemes to use in the uri matching, e.g.
Such usage isn't flagged up by RuboCop, since it appears to me to only check for string arguments.
Also, the existing example for string arguments should be changed, since it is confusing. It only makes sense to pass a schema to
Lint/UriRegexp should warn on the common usecase of
Lint/UriRegexp does not warn when using
Steps to reproduce the problem
It should have detected 3 offenses