Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
517 commits
Select commit Hold shift + click to select a range
dfa9dec
Label guard-not-followed false alarms with the &. rewrite
apiology Oct 9, 2026
a514042
Label the key?-guarded macro lookup marker
apiology Oct 9, 2026
f26a305
Narrow two guarded values in forms Solargraph follows
apiology Oct 9, 2026
5daea62
Point two guarded-value markers at castwide PR 1245
apiology Oct 9, 2026
147f84d
Resolve typecheck problems from nil @return tags
apiology Oct 9, 2026
1ad654c
Point directive root-pin markers at castwide PR 1392
apiology Oct 9, 2026
8ef876d
Guard and read the same block in Callable generics
apiology Oct 9, 2026
8d39cf4
Point the Callable block marker at castwide PR 1258
apiology Oct 9, 2026
e355b42
Resolve nil false alarm markers by mechanism
apiology Oct 9, 2026
dae34b7
Reject a diagnostics reporter entry with no name
apiology Oct 9, 2026
f65b679
Point the reporter-name marker at castwide PR 1259
apiology Oct 9, 2026
73847b1
Label combine_closure markers as repeated pure calls
apiology Oct 9, 2026
653c094
Read the delegated receiver chain into a local
apiology Oct 10, 2026
3fd816e
Point DelegatedMethod receiver-chain markers at castwide PR 1245
apiology Oct 10, 2026
da5ef20
Point DelegatedMethod resolver markers at castwide PR 1259
apiology Oct 10, 2026
5a22b4c
Point UniqueType.parse partial-subs markers at castwide PR 1223
apiology Oct 10, 2026
26036f5
Raise a clear error for a URI with no filename
apiology Oct 10, 2026
ed89014
Point file_to_uri filename markers at castwide PR 1245
apiology Oct 10, 2026
f895d15
Read macro text through YardMap::Macro#text
apiology Oct 10, 2026
921a03a
Point macro text markers at castwide PR 1245
apiology Oct 10, 2026
b120df7
Treat a location with no filename as not RBS
apiology Oct 10, 2026
bc127ce
Point Location#rbs? markers at castwide PR 1245
apiology Oct 10, 2026
04bef45
Guard and read the same block in Callable#transform_types
apiology Oct 10, 2026
f5b2d89
Point the transform_types block marker at castwide PR 1258
apiology Oct 10, 2026
8f0acba
Point the Store#update index marker at castwide PR 1104
apiology Oct 10, 2026
11fb50e
Split (see) references with String#rpartition
apiology Oct 10, 2026
a647414
Point the Method#resolve_reference path marker at castwide PR 1245
apiology Oct 10, 2026
6dbd820
Label the Shell#scan api_map marker with the &. rewrite
apiology Oct 10, 2026
26ac714
Label the parse directive comment-line marker with the fetch rewrite
apiology Oct 10, 2026
5b6c47a
Merge castwide master into the strong-typecheck cleanup
apiology Oct 13, 2026
05c98f5
Re-fit markers and tags to the merged master
apiology Oct 13, 2026
f283088
Mark the RuboCop offenses lookup with 1398
apiology Oct 13, 2026
8812f16
Label problems from the master re-fit
apiology Oct 13, 2026
6da1dc7
Tag choose_pin_attr and Pin::Base#equality_fields
apiology Oct 13, 2026
17b8ed7
Map one-off marker labels to PRs and shared labels
apiology Oct 13, 2026
77dbd96
Use safe navigation on receivers typed as nilable
apiology Oct 13, 2026
4692b11
Use fetch for indexes already bounds-checked
apiology Oct 13, 2026
92a4a41
Use Array#drop for attribute name children
apiology Oct 13, 2026
7dcad50
Read always-participating captures with to_s
apiology Oct 13, 2026
3ad634e
Map long-tail marker labels to shared labels
apiology Oct 13, 2026
522864e
Point rewrite-labelled markers at castwide 1245
apiology Oct 13, 2026
bd895a0
Apply remaining 1240 rewrites and label what is left
apiology Oct 13, 2026
b35cd94
Point the last rewrite-labelled markers at 1245
apiology Oct 13, 2026
993b8cc
Remove unneeded 1395 marker in Clip#tag_complete
apiology Oct 13, 2026
e532969
Point the MatchData RBS-fill marker at castwide 1385
apiology Oct 13, 2026
4c83cc9
Point issue-linked markers at PRs
apiology Oct 13, 2026
27d5e15
Point guard markers 1259 clears at castwide 1259
apiology Oct 13, 2026
340acfe
Label repeated-read guard markers as pure calls
apiology Oct 13, 2026
e4ce819
Point two guard markers at castwide 1245
apiology Oct 13, 2026
b5f5cdf
Replace key?-then-[] guards with Hash#fetch
apiology Oct 13, 2026
4d37f28
Merge castwide master (revert of 1390) into 1240
apiology Oct 13, 2026
ce89469
Restore markers the 1390 revert needs again
apiology Oct 13, 2026
19d27ec
Cover the methods undercover flags on 1245
apiology Oct 13, 2026
cb46949
Drop redundant safe navigation on respond_to?
apiology Oct 13, 2026
348eed6
Restore the _Raised label on backtrace markers
apiology Oct 13, 2026
86236a6
Pass source: to module_function ivar closure Namespace pin
apiology Oct 13, 2026
49c29e7
Point is_ast_node? guard markers at castwide 1396
apiology Oct 13, 2026
4bddb71
Revert "Replace key?-then-[] guards with Hash#fetch"
apiology Oct 13, 2026
a2e338e
Restore the Hash#key? guards marker label
apiology Oct 13, 2026
9082223
Label while-assignment guard markers as reassignment
apiology Oct 13, 2026
8299104
Relabel umbrella guard-support markers by cause
apiology Oct 13, 2026
451d5de
Track in-process constant resolution in a Set
apiology Oct 13, 2026
2d77714
Track Method#block memoization with a flag
apiology Oct 13, 2026
6cc2afc
Narrow pin type separately in Store#get_constants
apiology Oct 13, 2026
e9cedc1
Default the TypeCheck diagnostic level to a String
apiology Oct 13, 2026
650d543
Guard cop_list join with is_a?(Array)
apiology Oct 13, 2026
6594c06
Make the nil parameter guard a bare break
apiology Oct 13, 2026
61503bd
Render a parameterless generic as untyped RBS
apiology Oct 13, 2026
bef5ad4
Relabel return-type-not-inferred markers by cause
apiology Oct 13, 2026
6ee5fd9
Relabel guard-support markers to castwide#1245
apiology Oct 13, 2026
2921040
Declare that Parser.parse returns nil for empty code
apiology Oct 13, 2026
4db9927
Lint only the given code when a source has no filename
apiology Oct 14, 2026
3b145a8
Guard macro expansion on a Chain::Call link
apiology Oct 14, 2026
f3386de
Inherit Parser::AST::Node#children from AST::Node
apiology Oct 14, 2026
90cc2ae
Skip factory parameters for a literal nested in an argument
apiology Oct 14, 2026
68f7e57
Narrow the resolved factory method with is_a?
apiology Oct 14, 2026
3b1a572
Merge block pins when cataloging no pinsets
apiology Oct 14, 2026
c1a8d1c
Read the gem check error into a checked local
apiology Oct 14, 2026
43b6cfd
Declare that FlowSensitiveTyping#type_name takes nil
apiology Oct 14, 2026
12f86ff
Accept any namespace pin in ApiMap#erase_generics
apiology Oct 14, 2026
58d1869
Use fetch for the single yield type in Block
apiology Oct 14, 2026
1ad09f6
Relabel sg-ignore markers by verified cause
apiology Oct 14, 2026
2560e88
Relabel nil-check markers by 1245 outcome
apiology Oct 14, 2026
60e822b
Relabel unexplained sg-ignore markers by cause
apiology Oct 14, 2026
35fc229
Guard argument types instead of ignoring them
apiology Oct 14, 2026
05339be
Label splatted_hash? return marker by its cause
apiology Oct 14, 2026
6828fec
Relabel generic-inference markers by cause
apiology Oct 14, 2026
c6b2388
Label match[0] marker in find_recipient_node by PR
apiology Oct 14, 2026
7334912
Type the Chain inference cache and narrow helper returns
apiology Oct 14, 2026
2ec074e
Find the enclosing Breakable without select
apiology Oct 14, 2026
d29c547
Check the qualified param type before using it
apiology Oct 14, 2026
8193b11
Point .class == .class markers at castwide 1367
apiology Oct 14, 2026
97fd582
Guard JSON last line and extract profile test file
apiology Oct 14, 2026
e449cfd
Revert code changes moved to castwide 1245
apiology Oct 14, 2026
48d5a91
Narrow ALT_SEPARATOR via a local in host
apiology Oct 14, 2026
e9db25c
Pass version: to EnvironmentLoader#add
apiology Oct 14, 2026
9a9fe39
Look up BlankRubocopFormatter via const_get
apiology Oct 14, 2026
6ae94eb
Relabel generic @sg-ignore markers by cause
apiology Oct 14, 2026
4f2c913
Revert "Pass version: to EnvironmentLoader#add"
apiology Oct 14, 2026
bcd1aeb
Skip sources without a filename in Workspace#merge
apiology Oct 14, 2026
a932c02
Guard nil caller in references_from
apiology Oct 14, 2026
06ca212
Drop redundant to_sym in VisibilityDirective
apiology Oct 14, 2026
d3409dd
Skip unresolved includes in inner_get_methods
apiology Oct 14, 2026
4e71a3c
Mark JSON.parse lines moved to castwide 1245
apiology Oct 14, 2026
123f4c2
Relabel approved nil-false-alarm @sg-ignore markers
apiology Oct 14, 2026
79ebe9d
Skip pins with no YARD method object in rake_yard
apiology Oct 14, 2026
49cf65e
Re-check the queue after MessageWorker wakes
apiology Oct 14, 2026
1d6a054
Point nil-guard markers at castwide 1245
apiology Oct 14, 2026
5cb716f
Point the call.rb signature marker at castwide 1338
apiology Oct 14, 2026
27d8511
Restore version: nil on EnvironmentLoader#add
apiology Oct 14, 2026
9d1d489
Point tuple markers at castwide 1223, 1231, 1259
apiology Oct 14, 2026
fcc843e
Relabel @sg-ignore markers to their real causes
apiology Oct 14, 2026
4b77c91
Label block-parameter shadowing markers
apiology Oct 14, 2026
431c0a5
Label double-splat keyword markers
apiology Oct 14, 2026
cb9ea60
Label super-in-define_method markers
apiology Oct 14, 2026
7cb94d6
Label Boolean-in-ivar-type markers
apiology Oct 14, 2026
ce37749
Point two markers at open PRs 1231 and 1297
apiology Oct 15, 2026
96ad511
Label the Pin::Common#binder marker
apiology Oct 15, 2026
5a3d5e3
Point gemspec markers at PRs 1231 and 1320
apiology Oct 15, 2026
fd7fc6c
Replace markers citing closed PR 1050
apiology Oct 15, 2026
5200ae0
Relabel nine unexplained markers by cause
apiology Oct 15, 2026
08e49df
Declare SourceMap#convention_pins= as void
apiology Oct 15, 2026
6311fb7
Declare Ripper on_comment's return for CommentRipper
apiology Oct 15, 2026
e73dc27
Relabel eight child-union markers
apiology Oct 15, 2026
02463b8
Merge apiology/speed_up_specs_master into parallel_rspec_on_1237
apiology Oct 15, 2026
b019e57
Run specs on Ruby 4.1.0-preview1 in CI
apiology Oct 15, 2026
3a39050
Give each parse its own Prism parser
apiology Oct 15, 2026
2951322
Relabel External sources marker as generic gap
apiology Oct 15, 2026
d003754
Check the custom RuboCop version in a new process
apiology Oct 15, 2026
f424c71
Point two key? guard markers at apiology#172
apiology Oct 15, 2026
d8ab35c
Fill YARD MethodObject's namespace types
apiology Oct 15, 2026
4ef0902
Fill RuboCop::Options#parse
apiology Oct 15, 2026
185efef
Wait for an in-progress parse in Source#finalize
apiology Oct 15, 2026
1524a2e
Point five reassignment markers at castwide 1338
apiology Oct 15, 2026
e7eb88c
Fix Request#process return tag
apiology Oct 15, 2026
97f171b
Explain the Proc#call and flatten markers
apiology Oct 15, 2026
37f23ee
Point Repo bundle-map markers at castwide 1245
apiology Oct 15, 2026
50240ed
Relabel two nil false alarm markers by cause
apiology Oct 15, 2026
44e1c69
Raise TypeError on non-Array bundle metagems
apiology Oct 15, 2026
e025197
Point Repo#bundled markers at castwide 1245
apiology Oct 15, 2026
6576122
Point UniqueType.parse fetch marker at castwide 1266
apiology Oct 15, 2026
09fe97c
Tag ? methods that return nil and drop boolish
apiology Oct 16, 2026
30f33e7
Point CommentRipper super markers at castwide 1364
apiology Oct 16, 2026
3cd09d5
Put Ruby 4.1.0-preview1 in the rspec matrix proper
apiology Oct 16, 2026
453dc6b
Use the latest compatible Bundler on every job
apiology Oct 16, 2026
931db1e
Keep false when combining false boolean attributes
apiology Oct 16, 2026
4576789
Point visibility_directive markers at castwide 1245
apiology Oct 16, 2026
7cb22f3
Revert "Point visibility_directive markers at castwide 1245"
apiology Oct 16, 2026
9b21893
Trim CI from 33 checks to 19
apiology Oct 16, 2026
538f9db
Relabel key? markers to castwide#1417
apiology Oct 16, 2026
f1c1838
Relabel pure-call markers to castwide#1258
apiology Oct 16, 2026
95970e3
Relabel _NonEmpty markers to castwide#1258
apiology Oct 16, 2026
ed7fcf7
Drop two unneeded #1245 markers
apiology Oct 16, 2026
aa79d24
Key the yardoc cache on hashFiles, not a step
apiology Oct 16, 2026
100a9ff
Remove leftovers from the rspec workflow
apiology Oct 16, 2026
9a6e56f
Relabel child-node markers to castwide#1418
apiology Oct 16, 2026
3fea3f4
Relabel real-nil markers
apiology Oct 16, 2026
2c6be2a
Relabel three more child-node markers
apiology Oct 16, 2026
34ba9bc
Relabel ||= markers to castwide#1417
apiology Oct 16, 2026
688e5be
Label [0, n] slice markers
apiology Oct 16, 2026
8180c42
Add Source#filename! for filename-keyed hashes
apiology Oct 16, 2026
ed56003
Relabel nil false alarm markers
apiology Oct 16, 2026
c2c231f
Raise on impossible nils instead of ignoring them
apiology Oct 16, 2026
e32ee55
Reword MatchData#[] sg-ignore markers
apiology Oct 16, 2026
a9a26bf
Put impossible-nil raises on executed lines
apiology Oct 16, 2026
5c9c55a
Relabel _Raised markers to castwide#1231
apiology Oct 16, 2026
cb886b3
Relabel ivar assignment markers to castwide#1338
apiology Oct 16, 2026
a4cfc51
Relabel raise-unless key? markers to #1259
apiology Oct 16, 2026
488bcc2
Relabel child-node markers cleared by fixes
apiology Oct 16, 2026
ba9b36c
Relabel Hash#each block-param markers to #1223
apiology Oct 16, 2026
5e9c4a8
Check pin cache contents after Marshal.load
apiology Oct 16, 2026
d914254
Relabel Marshal.load marker to castwide#1245
apiology Oct 16, 2026
3997f37
Relabel code_object_at marker to castwide#1419
apiology Oct 16, 2026
9db426d
Relabel @return [undefined] markers to #1420
apiology Oct 16, 2026
6c3d1d7
Relabel double-splat markers to castwide#1231
apiology Oct 16, 2026
380eddf
Relabel apiology#139 markers to castwide#1421
apiology Oct 16, 2026
fe50e2e
Relabel default-proc hash markers to #1422
apiology Oct 16, 2026
2d5f5ed
Relabel define_method super markers to #1423
apiology Oct 16, 2026
2a57472
Restore two #1245 markers needed in plugin CI
apiology Oct 16, 2026
ffee330
Cite gem_rbs_collection#1104 on FlawedBuilder
apiology Oct 16, 2026
a0ca186
Relabel block-param shadow markers to #1424
apiology Oct 16, 2026
d5b11c0
Relabel resolve_and_cache marker to #1425
apiology Oct 16, 2026
55dccf5
Use filter_map in Search#do_query
apiology Oct 16, 2026
5a3f4eb
Relabel #compact marker to castwide#1299
apiology Oct 16, 2026
3d19fbe
Relabel Diagnoser#tick marker to #1426
apiology Oct 16, 2026
065e142
Merge castwide/master into extract-1240-code-changes
apiology Oct 17, 2026
4db383b
Remove two ignore markers the merge left unneeded
apiology Oct 17, 2026
419e747
Cover Class#new receiver matching in references
apiology Oct 17, 2026
bc5d9fc
Merge castwide/master into type annotation branch
apiology Oct 17, 2026
b5dc07f
Drop markers made unneeded by the master merge
apiology Oct 17, 2026
5e9a4dd
Merge castwide/master into map-engine-app-dirs
apiology Oct 17, 2026
c44eb5f
Merge remote-tracking branch 'castwide/master' into worktree-rubocop-…
apiology Oct 19, 2026
63f5672
Regenerate .rubocop_todo.yml after master merge
apiology Oct 19, 2026
6cf0510
Combine closures across class body scopes
apiology Oct 19, 2026
bc129f9
Close attribute directives over their namespace
apiology Oct 19, 2026
5a2f85f
Accept aliases of macro-defined methods in gems
apiology Oct 19, 2026
57236c2
Resolve aliases of top-level methods
apiology Oct 19, 2026
659a74d
Enable pending cops explicitly, not via NewCops
apiology Oct 19, 2026
6db004e
Merge castwide/master into continue_on_error
apiology Oct 19, 2026
f4bf213
Regenerate .rubocop_todo.yml at RuboCop 1.92.0
apiology Oct 19, 2026
23a5256
Limit PR to the undercover job-level change
apiology Oct 19, 2026
84eb354
Merge castwide/master into speed_up_specs_master
apiology Oct 19, 2026
5162e2a
Merge remote-tracking branch 'castwide/master' into consolidate-type-…
apiology Oct 19, 2026
28c9242
Merge speed_up_specs_master into parallel_rspec_on_1237
apiology Oct 19, 2026
434a759
Merge castwide/master into namespace-pin-source-for-module-function-i…
apiology Oct 19, 2026
9a58560
Drop 14 markers strong no longer needs
apiology Oct 19, 2026
7012480
Tag RbsCollection, External and Index#deep_clone
apiology Oct 19, 2026
e3b0339
Mark master's strong findings with known labels
apiology Oct 19, 2026
21cb7cb
Mark four strong findings with new labels
apiology Oct 19, 2026
796628c
Type AST::Node#children with its real union
apiology Oct 19, 2026
abab5ef
Restore the 14 child-node markers
apiology Oct 19, 2026
a0a7836
Mark child-node reads the real children type exposes
apiology Oct 19, 2026
1ac2f49
Retag library gem caches as Metagem
apiology Oct 20, 2026
da3aa1d
Run CI on ubuntu-24.04 instead of ubuntu-latest
apiology Oct 20, 2026
1c030a7
Merge remote-tracking branch 'apiology/pin-ci-runners-to-ubuntu-24-04…
apiology Oct 20, 2026
d693f0d
Type load_all's millisecond count as Integer
apiology Oct 20, 2026
8142eff
Remove dead External RBS collection path readers
apiology Oct 20, 2026
0f9780b
Ignore bundler-cache's vendor/bundle and .bundle
apiology Oct 20, 2026
83bcd19
Restore load_all's millisecond rounding
apiology Oct 20, 2026
73a5c1b
Ignore load_all's unresolved > against SLOW_BATCH_MS
apiology Oct 20, 2026
7dd5b35
Revert the castwide/solargraph#1434 runner pin
apiology Oct 20, 2026
5f069e4
Merge castwide/master (da44db2, castwide/solargraph#1436) into apiolo…
apiology Oct 20, 2026
5b90bc6
Merge castwide/solargraph#1260: [regression fix] Make RuboCop block C…
apiology Oct 20, 2026
daaf1ef
Merge castwide/solargraph#1047: [regression fix] Show undercover fail…
apiology Oct 20, 2026
db309db
Merge castwide/master (da44db2) into speed_up_specs_master
apiology Oct 20, 2026
323e9ea
Merge speed_up_specs_master into this branch
apiology Oct 20, 2026
433d1a2
Stop retrying gems whose cache command failed
apiology Oct 20, 2026
ac7a66c
Skip RBS collection gems that have no path
apiology Oct 20, 2026
0d48fe4
Satisfy RuboCop 1.92 style cops on PR lines
apiology Oct 20, 2026
4707176
Merge castwide/solargraph#1260 into parallel_rspec_on_1237
apiology Oct 20, 2026
732d2d2
Merge castwide/solargraph#1047 into parallel_rspec_on_1237
apiology Oct 20, 2026
d2465a7
Merge castwide/solargraph#1237: Spec performance fixes
apiology Oct 20, 2026
7d695ff
Merge apiology/solargraph#44: Cut CI duration from 20 minutes to 6
apiology Oct 20, 2026
975b3c8
Merge castwide/solargraph#1429: [regression fix] Stop asserts crash o…
apiology Oct 20, 2026
4aeef5f
Merge castwide/solargraph#1430: [regression fix] Resolve aliases of t…
apiology Oct 20, 2026
03ee10c
Merge castwide/solargraph#1431: [regression fix] Accept aliases of ma…
apiology Oct 20, 2026
7336062
Merge castwide/solargraph#1433: [regression fix] Stop closure asserts…
apiology Oct 20, 2026
a04dae9
Merge castwide/solargraph#1432: [regression fix] Close @!attribute di…
apiology Oct 20, 2026
7e7841a
Cite fixing PRs in labelled @sg-ignore comments
apiology Oct 21, 2026
3304594
Relink markers that apiology#225 clears
apiology Oct 21, 2026
7092a6b
Drop unneeded deep_clone ignore marker
apiology Oct 21, 2026
1fe4bf5
Mark ClassAssignmentNode child-node reads
apiology Oct 21, 2026
fd24f92
Say the start failure is handled below
apiology Oct 21, 2026
4529a90
Remove unreachable YardMap::Cache and @!domain
apiology Oct 21, 2026
76b6390
Cache kramdown-parser-gfm in strict external spec
apiology Oct 20, 2026
0ac9949
Merge castwide/solargraph#1245: Fix a nil crash and missing nil check…
apiology Oct 21, 2026
da71471
Merge castwide/solargraph#1240: [regression fix] Fix and re-enable st…
apiology Oct 21, 2026
3432767
Merge apiology/solargraph#44: Cut CI duration from 20 minutes to 6
apiology Oct 21, 2026
0615c7b
Merge castwide/solargraph#1442: [regression fix] Stop rerunning a gem…
apiology Oct 21, 2026
d159885
Merge castwide/solargraph#1404: [regression fix] Let conventions add …
apiology Oct 21, 2026
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
7 changes: 7 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#!/bin/bash

if [[ "$(uname)" == "Darwin" ]]; then
WORKERS=$(sysctl -n hw.physicalcpu)
export WORKERS
fi

# current git branch
SOLARGRAPH_FORCE_VERSION=0.0.1.dev-$(git rev-parse --abbrev-ref HEAD | tr -d '\n' | tr -d '/' | tr -d '-'| tr -d '_')
export SOLARGRAPH_FORCE_VERSION
64 changes: 49 additions & 15 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,22 @@ jobs:
echo "gem 'vernier', '>1.0', '<2'" >> .Gemfile
bundle install

- name: Restore cache of gem annotations
id: dot-cache-restore
uses: actions/cache/restore@v4
- name: Cache gem yardocs
uses: actions/cache@v4
with:
key: |
2025-06-26-09-${{ runner.os }}-dot-cache-${{ hashFiles('Gemfile.lock') }}
# Only the yardoc subtree: its path embeds each gem name and version, so a
# restored entry is either correct or never looked up, and a prefix hit is
# safe. The sibling .ser pins are keyed on Solargraph::VERSION, which is
# identical across commits, so carrying those would serve pins built by
# different lib/ code.
#
# github.job and the matrix Ruby version are in the key so jobs sharing one gem
# set do not race to reserve the same entry and fail to save.
path: ~/.cache/solargraph/yard-*
key: sg-yard-${{ runner.os }}-${{ github.job }}-${{ matrix.ruby-version }}-${{ hashFiles('Gemfile.lock') }}
restore-keys: |
2025-06-26-09-${{ runner.os }}-dot-cache
2025-06-26-09-${{ runner.os }}-dot-cache-
path: |
/home/runner/.cache/solargraph
sg-yard-${{ runner.os }}-${{ github.job }}-
sg-yard-${{ runner.os }}-

- name: Install gem types
run: bundle exec rbs collection install
Expand Down Expand Up @@ -108,7 +113,7 @@ jobs:
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.4
bundler-cache: false
bundler-cache: true

- name: Install gems
run: bundle install
Expand All @@ -118,6 +123,10 @@ jobs:
rubocop_todo:
name: .rubocop_todo.yml
runs-on: ubuntu-latest
# Needed only so the auto-update step (push-to-master only, below) can
# push a commit back to the branch it checked out.
permissions:
contents: write

steps:
- uses: actions/checkout@v3
Expand All @@ -131,21 +140,26 @@ jobs:
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.4
bundler-cache: false
bundler-cache: true

- name: Install gems
run: bundle install

- name: Run RuboCop
run: bundle exec rubocop -c .rubocop.yml
# @todo Temporary, expect to revert in 0.60
continue-on-error: true

# PRs and other non-master events: contributors are expected to have
# regenerated .rubocop_todo.yml locally and committed it; fail with the
# diff if they didn't. We can't auto-push here because GITHUB_TOKEN
# can't write to a fork's branch, which is where most PRs come from.
- name: Run RuboCop against todo file
continue-on-error: true
if: github.event_name != 'push' || github.ref != 'refs/heads/master'
run: |
cmd="bundle exec rubocop --auto-gen-config --exclude-limit=5 --no-offense-counts --no-auto-gen-timestamp"
${cmd:?}
# --auto-gen-config's exit code reflects the underlying offense count,
# not whether new offenses were introduced; the git diff check below
# is the actual pass/fail signal.
${cmd:?} || true
set +e
if [ -n "$(git status --porcelain)" ]
then
Expand All @@ -154,3 +168,23 @@ jobs:
>&2 echo "Please address any new issues, then run '${cmd:?}' and push up any improvements"
exit 1
fi

# Diffs here can only be a shrink: "Run RuboCop" above already
# confirmed no new offenses exist against .rubocop_todo.yml.
- name: Auto-update .rubocop_todo.yml
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
continue-on-error: true
run: |
cmd="bundle exec rubocop --auto-gen-config --exclude-limit=5 --no-offense-counts --no-auto-gen-timestamp"
${cmd:?} || true
if [ -n "$(git status --porcelain -- .rubocop_todo.yml)" ]
then
git diff -u -- .rubocop_todo.yml
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add .rubocop_todo.yml
git commit -m "Auto-update .rubocop_todo.yml [skip ci]"
git push origin HEAD:master
else
echo "No .rubocop_todo.yml cleanup needed."
fi
Loading
Loading