Skip to content

Conversation

apiology and others added 30 commits August 30, 2025 09:06
To avoid merge conflicts and contributors having to deal with
non-intuitive RuboCop todo changes:

* Lock down development versions of RuboCop and plugins so that
  unrelated PRs aren't affected by newly implemented RuboCop rules.
* Exclude rule entirely if more than 5 files violate it today, so that
  PRs are less likely to cause todo file changes unless they are
  specifically targeted at cleanup.
* Clarify guidance on RuboCop todo file in CI error message.
* Fix to hopefully ensure guidance always appears in CI error message.
Default values don't exist in RBS; it just tells you if the arg is
optinal or not - this was a problem in solargraph-rails specs while
assertions were on.
I'm not sure I could come up with a case where this matters in
practice, but this was spotted in the solargraph-rails specs when I
turned on assertions.  It was trying to parse:

```
Rails.application.config.filter_parameters += [
  :passw, :email, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn, :cvv, :cvc
]
```

from Rails' filter_parameter_logging.rb

https://github.com/iftheshoefritz/solargraph-rails/actions/runs/17915995139/job/50938306870?pr=173

```
       Expected method name to be a Symbol, got Parser::AST::Node for node s(:send,
         s(:send,
           s(:send,
             s(:const, nil, :Rails), :application), :config),
         s(:send,
           s(:send,
             s(:send,
               s(:send,
                 s(:const, nil, :Rails), :application), :config), :filter_parameters), :+,
           s(:array,
             s(:sym, :passw),
             s(:sym, :email),
             s(:sym, :secret),
             s(:sym, :token),
             s(:sym, :_key),
             s(:sym, :crypt),
             s(:sym, :salt),
             s(:sym, :certificate),
             s(:sym, :otp),
             s(:sym, :ssn),
             s(:sym, :cvv),
             s(:sym, :cvc))))
```

Blocks iftheshoefritz/solargraph-rails#173
Should fix solargraph-rails spec failures
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.

2 participants