You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bump the ruby-lsp dependency from `~> 0.17` to `~> 0.26` and raise
required_ruby_version to >= 3.0.0 to match what ruby-lsp now requires.
Addon changes:
- Implement `version`. Since 0.23 the addon base class treats it as
abstract and uses it for the `Addon.get(name, constraint)` compatibility
check, so without it any addon querying this one raises
AbstractMethodInvokedError.
- Drop the sorbet-runtime dependency. ruby-lsp no longer depends on it and
the only reference left here was a bare require; there is no `T.` or
`T::Sig` usage anywhere in the gem.
Test changes: the suite hand-rolled `with_server` against internals that
have since been removed (`core_ext/uri`, `RubyIndexer::IndexablePath`). It
now uses the `RubyLsp::TestHelper` module that ruby-lsp ships for addons,
requires `ruby_lsp/internal` instead of a long explicit require list, and
uses `pop_result` so notifications in the queue don't break the assertions.
The expected reek docs URL is interpolated from `Reek::Version::STRING`
rather than hardcoded.
Clean up the reek warnings so `rake code_analysis` passes:
- `Runner#build_examiner` (FeatureEnvy) is gone. It existed to work around
Examiner not accepting a separate source and origin, reaching into two of
its instance variables to do so. `SourceCode.from(source, origin:)` takes
an explicit origin and Examiner passes a SourceCode through untouched, so
the workaround is no longer needed.
- `Runner#warning_to_diagnostic` (UtilityFunction) moves to
`Reek::Diagnostic.from_warning`, which is what the smell was suggesting.
- `Runner#run_formatting` (UtilityFunction) is suppressed in place. The
Formatter interface requires an instance method and reek is a linter, so
there is nothing to format and no instance state to depend on.
The origin behaviour from #5 had no test, so add one covering it: a file
under a directory with a `.reek.yml` directory directive is exempt while a
file outside it is not. Verified it fails when the origin is dropped.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
0 commit comments