Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
6acfa0c
RuboCop todo file stability
apiology Aug 30, 2025
14be6bf
Merge remote-tracking branch 'origin/master' into rubocop_stability
apiology Aug 30, 2025
61260f3
Fix merge issue
apiology Aug 30, 2025
7c21510
Clean up RSpec/MessageSpies rubocop violations
apiology Sep 5, 2025
5afe71b
Fix up allow syntax
apiology Sep 5, 2025
7f2d490
Merge branch 'rubocop_stability' into message_spies_linting
apiology Sep 5, 2025
8edc773
Merge remote-tracking branch 'origin/master' into rubocop_stability
apiology Sep 6, 2025
bb0f607
Rerun rubocop todo
apiology Sep 6, 2025
65a0140
Merge remote-tracking branch 'origin/master' into message_spies_linting
apiology Sep 6, 2025
837d7f6
Force build
apiology Sep 7, 2025
a4208e7
Restore
apiology Sep 7, 2025
f08b76a
Merge remote-tracking branch 'origin/master' into fix_solargraph_rspe…
apiology Sep 7, 2025
b66f2ac
install -> update with rbs collection
apiology Sep 7, 2025
a09a9af
Try Ruby 3.2
apiology Sep 7, 2025
6fc8feb
Update solargraph
apiology Sep 7, 2025
388c170
Re-add bundle install
apiology Sep 7, 2025
f80b73a
Drop MATRIX_SOLARGRAPH_VERSION
apiology Sep 7, 2025
ce2bee6
Drop debugging changes
apiology Sep 7, 2025
c261704
Merge remote-tracking branch 'origin/master' into rubocop_stability
apiology Sep 7, 2025
dbe9a3e
Update expectations from master branch
apiology Sep 7, 2025
620fa00
Merge branch 'fix_solargraph_rspec_check' into rubocop_stability
apiology Sep 7, 2025
6bfb63c
Merge branch 'rubocop_stability' into message_spies_linting
apiology Sep 8, 2025
1b12d27
Merge branch 'master' into rubocop_stability
apiology Sep 13, 2025
db725f7
Update rubocop todo
apiology Sep 13, 2025
a9e60ca
Merge branch 'master' into message_spies_linting
apiology Sep 13, 2025
3177a89
Merge branch 'rubocop_stability' into message_spies_linting
apiology Sep 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,13 @@ jobs:
- name: Run RuboCop against todo file
continue-on-error: true
run: |
bundle exec rubocop --auto-gen-config --no-exclude-limit --no-offense-counts --no-auto-gen-timestamp
cmd="bundle exec rubocop --auto-gen-config --exclude-limit=5 --no-offense-counts --no-auto-gen-timestamp"
${cmd:?}
set +e
if [ -n "$(git status --porcelain)" ]
then
git status --porcelain
git diff -u .
>&2 echo "Please fix deltas if bad or run 'bundle exec rubocop --auto-gen-config --no-exclude-limit --no-offense-counts --no-auto-gen-timestamp' and push up changes if good"
>&2 echo "Please address any new issues, then run '${cmd:?}' and push up any improvements"
exit 1
fi
1 change: 0 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ Metrics/ParameterLists:
Max: 7
CountKeywordArgs: false


# we tend to use @@ and the risk doesn't seem high
Style/ClassVars:
Enabled: false
Expand Down
1,520 changes: 89 additions & 1,431 deletions .rubocop_todo.yml

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions lib/solargraph/api_map.rb
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,6 @@ def store
# @param skip [Set<String>]
# @param no_core [Boolean] Skip core classes if true
# @return [Array<Pin::Base>]
# rubocop:disable Metrics/CyclomaticComplexity
def inner_get_methods rooted_tag, scope, visibility, deep, skip, no_core = false
rooted_type = ComplexType.parse(rooted_tag).force_rooted
fqns = rooted_type.namespace
Expand Down Expand Up @@ -802,7 +801,6 @@ def inner_get_methods rooted_tag, scope, visibility, deep, skip, no_core = false
end
result
end
# rubocop:enable Metrics/CyclomaticComplexity

# @return [Hash]
def path_macros
Expand Down
13 changes: 10 additions & 3 deletions solargraph.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,16 @@ Gem::Specification.new do |s|
s.add_development_dependency 'public_suffix', '~> 3.1'
s.add_development_dependency 'rake', '~> 13.2'
s.add_development_dependency 'rspec', '~> 3.5'
s.add_development_dependency 'rubocop-rake', '~> 0.7'
s.add_development_dependency 'rubocop-rspec', '~> 3.6'
s.add_development_dependency 'rubocop-yard', '~> 1.0'
#
# very specific development-time RuboCop version patterns for CI
# stability - feel free to update in an isolated PR
#
# even more specific on RuboCop itself, which is written into _todo
# file.
s.add_development_dependency 'rubocop', '~> 1.80.0.0'
s.add_development_dependency 'rubocop-rake', '~> 0.7.1'
s.add_development_dependency 'rubocop-rspec', '~> 3.6.0'
s.add_development_dependency 'rubocop-yard', '~> 1.0.0'
s.add_development_dependency 'simplecov', '~> 0.21'
s.add_development_dependency 'simplecov-lcov', '~> 0.8'
s.add_development_dependency 'undercover', '~> 0.7'
Expand Down
3 changes: 0 additions & 3 deletions spec/api_map_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
require 'tmpdir'

describe Solargraph::ApiMap do
# rubocop:disable RSpec/InstanceVariable
before :all do
@api_map = Solargraph::ApiMap.new
end
Expand Down Expand Up @@ -878,6 +877,4 @@ def c
clip = api_map.clip_at('test.rb', [18, 4])
expect(clip.infer.to_s).to eq('Integer')
end

# rubocop:enable RSpec/InstanceVariable
end
2 changes: 0 additions & 2 deletions spec/convention_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
describe Solargraph::Convention do
# rubocop:disable RSpec/ExampleLength, RSpec/MultipleExpectations
it 'newly defined pins are resolved by ApiMap after file changes' do
filename = 'test.rb'

Expand Down Expand Up @@ -106,5 +105,4 @@ def local _source_map

described_class.unregister updated_dummy_convention
end
# rubocop:enable RSpec/ExampleLength, RSpec/MultipleExpectations
end
3 changes: 2 additions & 1 deletion spec/doc_map_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@
it 'does not warn for redundant requires' do
# Requiring 'set' is unnecessary because it's already included in core. It
# might make sense to log redundant requires, but a warning is overkill.
expect(Solargraph.logger).not_to receive(:warn).with(/path set/)
allow(Solargraph.logger).to receive(:warn)
Solargraph::DocMap.new(['set'], [])
expect(Solargraph.logger).not_to have_received(:warn).with(/path set/)
end

it 'ignores nil requires' do
Expand Down
3 changes: 2 additions & 1 deletion spec/language_server/host/diagnoser_spec.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
describe Solargraph::LanguageServer::Host::Diagnoser do
it "diagnoses on ticks" do
host = double(Solargraph::LanguageServer::Host, options: { 'diagnostics' => true }, synchronizing?: false)
allow(host).to receive(:diagnose)
diagnoser = Solargraph::LanguageServer::Host::Diagnoser.new(host)
diagnoser.schedule 'file.rb'
expect(host).to receive(:diagnose).with('file.rb')
diagnoser.tick
expect(host).to have_received(:diagnose).with('file.rb')
end
end
3 changes: 2 additions & 1 deletion spec/language_server/host/message_worker_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
it "handle requests on queue" do
host = double(Solargraph::LanguageServer::Host)
message = {'method' => '$/example'}
expect(host).to receive(:receive).with(message).and_return(nil)
allow(host).to receive(:receive).with(message).and_return(nil)

worker = Solargraph::LanguageServer::Host::MessageWorker.new(host)
worker.queue(message)
expect(worker.messages).to eq [message]
worker.tick
expect(host).to have_received(:receive).with(message)
end
end