Skip to content

Add Rubocop rule to catch arrays of size > 300. Also fix a bunch of .rubocop_todo.yml#2256

Open
jneen wants to merge 2 commits intomainfrom
maint.rubocop-large-arrays
Open

Add Rubocop rule to catch arrays of size > 300. Also fix a bunch of .rubocop_todo.yml#2256
jneen wants to merge 2 commits intomainfrom
maint.rubocop-large-arrays

Conversation

@jneen
Copy link
Member

@jneen jneen commented Mar 20, 2026

Adds a custom cop to deal with huge array literals not in lazily-loaded files. I will be going through the todo file and fixing these in the next few weeks.

Also disables the following Rubocop rules:

  • Lint/OutOfRangeRegexpRef is just broken as far as I can tell, it is catching perfectly valid uses of these refs.
  • Lint/MissingSuper is just not helpful most of the time in this project
  • Lint/ToEnumArguments is not able to tell when arguments are deprecated, and is therefore not actionable and just noise
  • Lint/NextedPercentLiteral is full of false-positives on account of the strange string literals we have to deal with in this project
  • Lint/DuplicateBranch after fixing a number of these (though I included the fixes) I concluded that most instances caught were not actually problems.
  • Naming/MethodParameterName encourages huge variable names when small ones will do
  • Naming/HeredocDelimiterNaming is useless and annoying
  • Naming/VariableNumber is very opinionated on a very strange opinion

@jneen jneen mentioned this pull request Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant