Add cop prohibiting params argument in url_for
What does this MR do?
It adds a new cop that restricts using param
as an argument in url_for
method.
It only checks if this argument is present in the method calling. If a param is processed before, no offense is found
Example, that will pass rubocop:
url_params = params.merge(add: 1)
url_for(url_params)
Open to discussion how strict this cop should be
What are the relevant issue numbers?
Closes #47986 (closed)
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
Tests added for this feature/bug -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides -
Link to e2e tests MR added if this MR has Requires e2e tests label. See the Test Planning Process.
/cc @smcgivern