Skip to content

CodeReuse rule: allow `limit`

Matthias Käppler requested to merge code-reuse-allow-limit into master

Description of the proposal

Related: gitlab-org/gitlab!54555 (merged)

This MR proposes to allow calls to limit outside of AR models. It is currently sometimes circumvented by using the at_most helper, which bypassed the lint check. It seems reasonable to limit result sets outside of AR models.

You can vote 👍 / 👎 directly on this MR.

Check-list

  • Mention this proposal in the relevant Slack channels (e.g. #development, #backend, #frontend)
  • If there is a choice to make between two potential styles, set up an emoji vote in the MR:
    • CHOICE_A: 🅰
    • CHOICE_B: 🅱
    • Vote yourself for both choices so that people know these are the choices
  • The MR doesn't have significant objections, and is getting a majority of 👍 vs 👎 (remember that we don't need to reach a consensus)
  • (If applicable) One style is getting a majority of vote (compared to the other choice)
  • (If applicable) Update the MR with the chosen style
  • Follow the review process as usual

/cc @gitlab-org/maintainers/rails-backend

Edited by Matthias Käppler

Merge request reports