solargraph 0.50.0 → 0.58.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (264) hide show
  1. checksums.yaml +4 -4
  2. data/.gitattributes +2 -0
  3. data/.github/workflows/linting.yml +127 -0
  4. data/.github/workflows/plugins.yml +218 -0
  5. data/.github/workflows/rspec.yml +58 -12
  6. data/.github/workflows/typecheck.yml +39 -0
  7. data/.gitignore +8 -0
  8. data/.overcommit.yml +72 -0
  9. data/.rspec +1 -0
  10. data/.rubocop.yml +66 -0
  11. data/.rubocop_todo.yml +1279 -0
  12. data/.yardopts +3 -2
  13. data/CHANGELOG.md +306 -3
  14. data/README.md +29 -18
  15. data/Rakefile +125 -13
  16. data/SPONSORS.md +2 -9
  17. data/bin/solargraph +3 -0
  18. data/lib/solargraph/api_map/cache.rb +110 -70
  19. data/lib/solargraph/api_map/constants.rb +279 -0
  20. data/lib/solargraph/api_map/index.rb +193 -0
  21. data/lib/solargraph/api_map/source_to_yard.rb +97 -81
  22. data/lib/solargraph/api_map/store.rb +384 -268
  23. data/lib/solargraph/api_map.rb +945 -704
  24. data/lib/solargraph/bench.rb +21 -3
  25. data/lib/solargraph/complex_type/type_methods.rb +228 -134
  26. data/lib/solargraph/complex_type/unique_type.rb +482 -132
  27. data/lib/solargraph/complex_type.rb +444 -254
  28. data/lib/solargraph/convention/active_support_concern.rb +111 -0
  29. data/lib/solargraph/convention/base.rb +20 -3
  30. data/lib/solargraph/convention/data_definition/data_assignment_node.rb +61 -0
  31. data/lib/solargraph/convention/data_definition/data_definition_node.rb +91 -0
  32. data/lib/solargraph/convention/data_definition.rb +105 -0
  33. data/lib/solargraph/convention/gemspec.rb +3 -2
  34. data/lib/solargraph/convention/struct_definition/struct_assignment_node.rb +61 -0
  35. data/lib/solargraph/convention/struct_definition/struct_definition_node.rb +102 -0
  36. data/lib/solargraph/convention/struct_definition.rb +164 -0
  37. data/lib/solargraph/convention.rb +36 -7
  38. data/lib/solargraph/converters/dd.rb +5 -0
  39. data/lib/solargraph/converters/dl.rb +3 -0
  40. data/lib/solargraph/converters/dt.rb +3 -0
  41. data/lib/solargraph/diagnostics/require_not_found.rb +53 -53
  42. data/lib/solargraph/diagnostics/rubocop.rb +118 -112
  43. data/lib/solargraph/diagnostics/rubocop_helpers.rb +68 -65
  44. data/lib/solargraph/diagnostics/type_check.rb +55 -54
  45. data/lib/solargraph/diagnostics.rb +2 -2
  46. data/lib/solargraph/doc_map.rb +439 -0
  47. data/lib/solargraph/environ.rb +9 -2
  48. data/lib/solargraph/equality.rb +34 -0
  49. data/lib/solargraph/gem_pins.rb +98 -0
  50. data/lib/solargraph/language_server/host/diagnoser.rb +89 -89
  51. data/lib/solargraph/language_server/host/dispatch.rb +130 -111
  52. data/lib/solargraph/language_server/host/message_worker.rb +112 -59
  53. data/lib/solargraph/language_server/host/sources.rb +99 -156
  54. data/lib/solargraph/language_server/host.rb +878 -869
  55. data/lib/solargraph/language_server/message/base.rb +20 -12
  56. data/lib/solargraph/language_server/message/completion_item/resolve.rb +3 -1
  57. data/lib/solargraph/language_server/message/extended/check_gem_version.rb +114 -100
  58. data/lib/solargraph/language_server/message/extended/document.rb +23 -20
  59. data/lib/solargraph/language_server/message/extended/document_gems.rb +3 -3
  60. data/lib/solargraph/language_server/message/initialize.rb +28 -1
  61. data/lib/solargraph/language_server/message/initialized.rb +1 -0
  62. data/lib/solargraph/language_server/message/text_document/completion.rb +56 -59
  63. data/lib/solargraph/language_server/message/text_document/definition.rb +40 -38
  64. data/lib/solargraph/language_server/message/text_document/document_symbol.rb +26 -23
  65. data/lib/solargraph/language_server/message/text_document/formatting.rb +148 -126
  66. data/lib/solargraph/language_server/message/text_document/hover.rb +58 -56
  67. data/lib/solargraph/language_server/message/text_document/signature_help.rb +24 -24
  68. data/lib/solargraph/language_server/message/text_document/type_definition.rb +25 -0
  69. data/lib/solargraph/language_server/message/text_document.rb +1 -1
  70. data/lib/solargraph/language_server/message/workspace/did_change_configuration.rb +5 -0
  71. data/lib/solargraph/language_server/message/workspace/did_change_workspace_folders.rb +2 -0
  72. data/lib/solargraph/language_server/message/workspace/workspace_symbol.rb +23 -23
  73. data/lib/solargraph/language_server/message.rb +1 -0
  74. data/lib/solargraph/language_server/progress.rb +143 -0
  75. data/lib/solargraph/language_server/request.rb +4 -1
  76. data/lib/solargraph/language_server/transport/adapter.rb +16 -1
  77. data/lib/solargraph/language_server/transport/data_reader.rb +2 -0
  78. data/lib/solargraph/language_server.rb +1 -0
  79. data/lib/solargraph/library.rb +683 -551
  80. data/lib/solargraph/location.rb +82 -37
  81. data/lib/solargraph/logging.rb +37 -27
  82. data/lib/solargraph/page.rb +9 -0
  83. data/lib/solargraph/parser/comment_ripper.rb +69 -52
  84. data/lib/solargraph/parser/flow_sensitive_typing.rb +255 -0
  85. data/lib/solargraph/parser/node_processor/base.rb +92 -77
  86. data/lib/solargraph/parser/node_processor.rb +62 -43
  87. data/lib/solargraph/parser/{legacy → parser_gem}/class_methods.rb +149 -135
  88. data/lib/solargraph/parser/{legacy → parser_gem}/flawed_builder.rb +4 -1
  89. data/lib/solargraph/parser/{legacy → parser_gem}/node_chainer.rb +166 -148
  90. data/lib/solargraph/parser/{legacy → parser_gem}/node_methods.rb +486 -325
  91. data/lib/solargraph/parser/{rubyvm → parser_gem}/node_processors/alias_node.rb +3 -2
  92. data/lib/solargraph/parser/parser_gem/node_processors/and_node.rb +22 -0
  93. data/lib/solargraph/parser/parser_gem/node_processors/args_node.rb +59 -0
  94. data/lib/solargraph/parser/{rubyvm → parser_gem}/node_processors/begin_node.rb +15 -15
  95. data/lib/solargraph/parser/{legacy → parser_gem}/node_processors/block_node.rb +46 -42
  96. data/lib/solargraph/parser/{legacy → parser_gem}/node_processors/casgn_node.rb +4 -3
  97. data/lib/solargraph/parser/{legacy → parser_gem}/node_processors/cvasgn_node.rb +3 -2
  98. data/lib/solargraph/parser/{legacy → parser_gem}/node_processors/def_node.rb +53 -63
  99. data/lib/solargraph/parser/{legacy → parser_gem}/node_processors/defs_node.rb +4 -3
  100. data/lib/solargraph/parser/{legacy → parser_gem}/node_processors/gvasgn_node.rb +3 -2
  101. data/lib/solargraph/parser/parser_gem/node_processors/if_node.rb +23 -0
  102. data/lib/solargraph/parser/{legacy → parser_gem}/node_processors/ivasgn_node.rb +40 -38
  103. data/lib/solargraph/parser/{legacy → parser_gem}/node_processors/lvasgn_node.rb +29 -28
  104. data/lib/solargraph/parser/parser_gem/node_processors/masgn_node.rb +59 -0
  105. data/lib/solargraph/parser/{legacy → parser_gem}/node_processors/namespace_node.rb +10 -9
  106. data/lib/solargraph/parser/parser_gem/node_processors/opasgn_node.rb +98 -0
  107. data/lib/solargraph/parser/{legacy → parser_gem}/node_processors/orasgn_node.rb +17 -16
  108. data/lib/solargraph/parser/{legacy → parser_gem}/node_processors/resbody_node.rb +38 -36
  109. data/lib/solargraph/parser/{legacy → parser_gem}/node_processors/sclass_node.rb +52 -42
  110. data/lib/solargraph/parser/{legacy → parser_gem}/node_processors/send_node.rb +291 -257
  111. data/lib/solargraph/parser/{rubyvm → parser_gem}/node_processors/sym_node.rb +4 -2
  112. data/lib/solargraph/parser/parser_gem/node_processors/until_node.rb +29 -0
  113. data/lib/solargraph/parser/parser_gem/node_processors/while_node.rb +29 -0
  114. data/lib/solargraph/parser/parser_gem/node_processors.rb +70 -0
  115. data/lib/solargraph/parser/parser_gem.rb +12 -0
  116. data/lib/solargraph/parser/region.rb +69 -66
  117. data/lib/solargraph/parser/snippet.rb +17 -13
  118. data/lib/solargraph/parser.rb +9 -12
  119. data/lib/solargraph/pin/base.rb +729 -299
  120. data/lib/solargraph/pin/base_variable.rb +126 -84
  121. data/lib/solargraph/pin/block.rb +104 -73
  122. data/lib/solargraph/pin/breakable.rb +9 -0
  123. data/lib/solargraph/pin/callable.rb +231 -0
  124. data/lib/solargraph/pin/closure.rb +72 -37
  125. data/lib/solargraph/pin/common.rb +79 -70
  126. data/lib/solargraph/pin/constant.rb +2 -0
  127. data/lib/solargraph/pin/conversions.rb +123 -92
  128. data/lib/solargraph/pin/delegated_method.rb +120 -0
  129. data/lib/solargraph/pin/documenting.rb +114 -105
  130. data/lib/solargraph/pin/instance_variable.rb +34 -30
  131. data/lib/solargraph/pin/keyword.rb +20 -15
  132. data/lib/solargraph/pin/local_variable.rb +75 -55
  133. data/lib/solargraph/pin/method.rb +672 -335
  134. data/lib/solargraph/pin/method_alias.rb +34 -31
  135. data/lib/solargraph/pin/namespace.rb +115 -94
  136. data/lib/solargraph/pin/parameter.rb +275 -206
  137. data/lib/solargraph/pin/proxy_type.rb +39 -29
  138. data/lib/solargraph/pin/reference/override.rb +47 -29
  139. data/lib/solargraph/pin/reference/require.rb +2 -2
  140. data/lib/solargraph/pin/reference/superclass.rb +15 -10
  141. data/lib/solargraph/pin/reference.rb +39 -14
  142. data/lib/solargraph/pin/search.rb +61 -56
  143. data/lib/solargraph/pin/signature.rb +61 -23
  144. data/lib/solargraph/pin/singleton.rb +1 -1
  145. data/lib/solargraph/pin/symbol.rb +53 -47
  146. data/lib/solargraph/pin/until.rb +18 -0
  147. data/lib/solargraph/pin/while.rb +18 -0
  148. data/lib/solargraph/pin.rb +44 -38
  149. data/lib/solargraph/pin_cache.rb +245 -0
  150. data/lib/solargraph/position.rb +132 -100
  151. data/lib/solargraph/range.rb +112 -95
  152. data/lib/solargraph/rbs_map/conversions.rb +823 -394
  153. data/lib/solargraph/rbs_map/core_fills.rb +53 -30
  154. data/lib/solargraph/rbs_map/core_map.rb +58 -38
  155. data/lib/solargraph/rbs_map/stdlib_map.rb +43 -36
  156. data/lib/solargraph/rbs_map.rb +163 -73
  157. data/lib/solargraph/shell.rb +352 -244
  158. data/lib/solargraph/source/chain/array.rb +37 -0
  159. data/lib/solargraph/source/chain/block_symbol.rb +13 -0
  160. data/lib/solargraph/source/chain/block_variable.rb +1 -1
  161. data/lib/solargraph/source/chain/call.rb +337 -215
  162. data/lib/solargraph/source/chain/constant.rb +26 -75
  163. data/lib/solargraph/source/chain/hash.rb +34 -28
  164. data/lib/solargraph/source/chain/head.rb +1 -1
  165. data/lib/solargraph/source/chain/if.rb +28 -0
  166. data/lib/solargraph/source/chain/instance_variable.rb +13 -13
  167. data/lib/solargraph/source/chain/link.rb +44 -6
  168. data/lib/solargraph/source/chain/literal.rb +48 -23
  169. data/lib/solargraph/source/chain/or.rb +23 -23
  170. data/lib/solargraph/source/chain/z_super.rb +4 -4
  171. data/lib/solargraph/source/chain.rb +291 -179
  172. data/lib/solargraph/source/change.rb +82 -79
  173. data/lib/solargraph/source/cursor.rb +166 -164
  174. data/lib/solargraph/source/encoding_fixes.rb +23 -23
  175. data/lib/solargraph/source/source_chainer.rb +194 -191
  176. data/lib/solargraph/source/updater.rb +55 -54
  177. data/lib/solargraph/source.rb +498 -522
  178. data/lib/solargraph/source_map/clip.rb +226 -229
  179. data/lib/solargraph/source_map/data.rb +34 -0
  180. data/lib/solargraph/source_map/mapper.rb +259 -243
  181. data/lib/solargraph/source_map.rb +212 -180
  182. data/lib/solargraph/type_checker/checks.rb +124 -112
  183. data/lib/solargraph/type_checker/param_def.rb +37 -35
  184. data/lib/solargraph/type_checker/problem.rb +32 -32
  185. data/lib/solargraph/type_checker/rules.rb +84 -57
  186. data/lib/solargraph/type_checker.rb +814 -549
  187. data/lib/solargraph/version.rb +5 -5
  188. data/lib/solargraph/views/_method.erb +10 -10
  189. data/lib/solargraph/views/_namespace.erb +3 -3
  190. data/lib/solargraph/views/document.erb +10 -10
  191. data/lib/solargraph/views/environment.erb +3 -5
  192. data/lib/solargraph/workspace/config.rb +255 -231
  193. data/lib/solargraph/workspace/require_paths.rb +97 -0
  194. data/lib/solargraph/workspace.rb +220 -212
  195. data/lib/solargraph/yard_map/cache.rb +6 -0
  196. data/lib/solargraph/yard_map/helpers.rb +44 -16
  197. data/lib/solargraph/yard_map/mapper/to_constant.rb +8 -5
  198. data/lib/solargraph/yard_map/mapper/to_method.rb +130 -81
  199. data/lib/solargraph/yard_map/mapper/to_namespace.rb +31 -27
  200. data/lib/solargraph/yard_map/mapper.rb +79 -77
  201. data/lib/solargraph/yard_map/to_method.rb +89 -79
  202. data/lib/solargraph/yard_map.rb +1 -284
  203. data/lib/solargraph/yard_tags.rb +20 -0
  204. data/lib/solargraph/yardoc.rb +87 -0
  205. data/lib/solargraph.rb +105 -69
  206. data/rbs/fills/bundler/0/bundler.rbs +4271 -0
  207. data/rbs/fills/open3/0/open3.rbs +172 -0
  208. data/rbs/fills/rubygems/0/basic_specification.rbs +326 -0
  209. data/rbs/fills/rubygems/0/errors.rbs +364 -0
  210. data/rbs/fills/rubygems/0/spec_fetcher.rbs +107 -0
  211. data/rbs/fills/rubygems/0/specification.rbs +1753 -0
  212. data/rbs/fills/tuple/tuple.rbs +149 -0
  213. data/rbs/shims/ast/0/node.rbs +5 -0
  214. data/rbs/shims/ast/2.4/.rbs_meta.yaml +9 -0
  215. data/rbs/shims/ast/2.4/ast.rbs +73 -0
  216. data/rbs/shims/parser/3.2.0.1/builders/default.rbs +195 -0
  217. data/rbs/shims/parser/3.2.0.1/manifest.yaml +7 -0
  218. data/rbs/shims/parser/3.2.0.1/parser.rbs +201 -0
  219. data/rbs/shims/parser/3.2.0.1/polyfill.rbs +4 -0
  220. data/rbs/shims/thor/1.2.0.1/.rbs_meta.yaml +9 -0
  221. data/rbs/shims/thor/1.2.0.1/manifest.yaml +7 -0
  222. data/rbs/shims/thor/1.2.0.1/thor.rbs +17 -0
  223. data/rbs_collection.yaml +19 -0
  224. data/solargraph.gemspec +39 -11
  225. metadata +354 -97
  226. data/lib/.rubocop.yml +0 -22
  227. data/lib/solargraph/api_map/bundler_methods.rb +0 -22
  228. data/lib/solargraph/cache.rb +0 -53
  229. data/lib/solargraph/convention/rspec.rb +0 -30
  230. data/lib/solargraph/documentor.rb +0 -76
  231. data/lib/solargraph/language_server/host/cataloger.rb +0 -56
  232. data/lib/solargraph/parser/legacy/node_processors/alias_node.rb +0 -23
  233. data/lib/solargraph/parser/legacy/node_processors/args_node.rb +0 -35
  234. data/lib/solargraph/parser/legacy/node_processors/begin_node.rb +0 -15
  235. data/lib/solargraph/parser/legacy/node_processors/sym_node.rb +0 -18
  236. data/lib/solargraph/parser/legacy/node_processors.rb +0 -54
  237. data/lib/solargraph/parser/legacy.rb +0 -12
  238. data/lib/solargraph/parser/node_methods.rb +0 -43
  239. data/lib/solargraph/parser/rubyvm/class_methods.rb +0 -149
  240. data/lib/solargraph/parser/rubyvm/node_chainer.rb +0 -160
  241. data/lib/solargraph/parser/rubyvm/node_methods.rb +0 -315
  242. data/lib/solargraph/parser/rubyvm/node_processors/args_node.rb +0 -85
  243. data/lib/solargraph/parser/rubyvm/node_processors/block_node.rb +0 -42
  244. data/lib/solargraph/parser/rubyvm/node_processors/casgn_node.rb +0 -33
  245. data/lib/solargraph/parser/rubyvm/node_processors/cvasgn_node.rb +0 -23
  246. data/lib/solargraph/parser/rubyvm/node_processors/def_node.rb +0 -75
  247. data/lib/solargraph/parser/rubyvm/node_processors/defs_node.rb +0 -68
  248. data/lib/solargraph/parser/rubyvm/node_processors/gvasgn_node.rb +0 -23
  249. data/lib/solargraph/parser/rubyvm/node_processors/ivasgn_node.rb +0 -38
  250. data/lib/solargraph/parser/rubyvm/node_processors/kw_arg_node.rb +0 -39
  251. data/lib/solargraph/parser/rubyvm/node_processors/lit_node.rb +0 -20
  252. data/lib/solargraph/parser/rubyvm/node_processors/lvasgn_node.rb +0 -27
  253. data/lib/solargraph/parser/rubyvm/node_processors/namespace_node.rb +0 -39
  254. data/lib/solargraph/parser/rubyvm/node_processors/opt_arg_node.rb +0 -26
  255. data/lib/solargraph/parser/rubyvm/node_processors/orasgn_node.rb +0 -15
  256. data/lib/solargraph/parser/rubyvm/node_processors/resbody_node.rb +0 -45
  257. data/lib/solargraph/parser/rubyvm/node_processors/sclass_node.rb +0 -32
  258. data/lib/solargraph/parser/rubyvm/node_processors/scope_node.rb +0 -15
  259. data/lib/solargraph/parser/rubyvm/node_processors/send_node.rb +0 -279
  260. data/lib/solargraph/parser/rubyvm/node_processors.rb +0 -63
  261. data/lib/solargraph/parser/rubyvm/node_wrapper.rb +0 -47
  262. data/lib/solargraph/parser/rubyvm.rb +0 -40
  263. data/lib/solargraph/rbs_map/core_signs.rb +0 -33
  264. data/lib/yard-solargraph.rb +0 -33
data/.yardopts CHANGED
@@ -1,2 +1,3 @@
1
- lib/**/*.rb
2
- -e lib/yard-solargraph.rb
1
+ lib/**/*.rb
2
+ --plugin yard-solargraph
3
+ --plugin activesupport-concern
data/CHANGELOG.md CHANGED
@@ -1,3 +1,306 @@
1
+ ## 0.58.2 - January 19, 2026
2
+ - Avoid rbs pollution (#1146)
3
+ - Fix 'solargraph pin --references ClassName' private method call (#1150)
4
+ - Improve memory efficiency of Position class (#1054)
5
+ - Raise InvalidOffsetError for offsets > text (#1155)
6
+
7
+ ## 0.58.1 - January 2, 2026
8
+ - Normalize line endings to LF (#1142)
9
+
10
+ ## 0.58.0 - January 1, 2026
11
+ - Faster constant resolution (#1083)
12
+ - [regression] Handle RBS static method aliases (#1094)
13
+ - More type fills and shims (#1005)
14
+ - Fix resolution in blocks in type checker (#890)
15
+ - Annotation fixes for strong typechecking (#1057)
16
+ - Remove dead code (#1077)
17
+ - Fix flakey spec (#1080)
18
+ - Fix bad sexpr generation in op_asgn (#1089)
19
+ - Opt-in for MFA requirement (#730)
20
+ - [regression] Fix resolution issues with namespaces from YARD (#1097)
21
+ - Improve a pin combination case around selfy types (#1024)
22
+ - Rescue reference errors in hosts (#1105)
23
+ - Relax bundler runtime dependency version constraint to support newer versions (#1125)
24
+ - Remove stale Pathname test (#1135)
25
+ - Enable strong type checking in CI (#928)
26
+ - Stale sg-ignore
27
+ - Use rbs 3.9.5 in tests (#1136)
28
+ - Drop broken 'namespaces' method (#1065)
29
+ - Add ActiveRecord example from RBS (#1074)
30
+ - Keep workspace directories as absolute paths (#1076)
31
+ - Handle bad gem_dir from gemspec object (#1079)
32
+ - Test for absolute require paths (#1137)
33
+ - [regression] Fix resolution of ambiguous argument types (#1098)
34
+ - Remove sg-ignore for String#=~ (#1138)
35
+ - Allow levels to be changed for typechecking rules in .solargraph.yml (#1126)
36
+
37
+ ## 0.57.0 - September 16, 2025
38
+ - Support ActiveSupport::Concern pattern for class methods (#948)
39
+ - More CI checks (#996)
40
+ - Linting / type annotation fixes (#999)
41
+ - Avoid overlapping chdir calls in multiple threads (#1007)
42
+ - Fix kwarg generation in ApiMap::SourceToYard (#1003)
43
+ - Enable Steep typechecking of Solargraph code (#1004)
44
+ - Fix convention requires (#1008)
45
+ - Plugin Util: Add Combination Priority (#1010)
46
+ - [regression] Fix crash while typechecking files with Struct use (#1031)
47
+ - Remove yard reference from gemfile (#1033)
48
+ - Allow newer RBS gem versions, exclude incompatible ones (#995)
49
+ - Look for external requires before cataloging bench (#1021)
50
+ - Remove Library#folding_ranges (#904)
51
+ - Complain in strong type-checking if an @sg-ignore line is not needed (#1011)
52
+ - Document a log level env variable (#894)
53
+ - Fix hole in type checking evaluation (#1009)
54
+ - Improve typechecking error message (#1014)
55
+ - Internal strict type-checking fixes (#1013)
56
+ - Reproduce and fix a ||= (or-asgn) evaluation issue (#1017)
57
+ - Define closure for Pin::Symbol, for completeness (#1027)
58
+ - Fix 'all!' config to reporters (#1018)
59
+ - Fix DocMap.all_rbs_collection_gems_in_memory return type (#1037)
60
+ - Fix RuboCop linting errors in regular expressions (#1038)
61
+ - Resolve class aliases via Constant pins (#1029)
62
+ - Speed-up LSP completion response times (#1035)
63
+ - Revert "Resolve class aliases via Constant pins (#1029)" (#1041)
64
+ - Avoid stack errors when resolving method aliases (#1040)
65
+ - [regression] Refine order of object convention method pins (#1036)
66
+ - Fix crash while generating activesupport pins (#1043)
67
+ - Type annotation improvements (#1016)
68
+ - Resolve class aliases via Constant pins (#1048)
69
+ - Understand "Parser::AST::Node < AST::Node" in RBS (#1060)
70
+ - Factor out require_paths logic to its own class (#1062)
71
+ - Fix type errors found in strong typechecking (#1045)
72
+ - Run plugin specs separately for perf insights (#1046)
73
+ - Run specs from solargraph-rails configured against current code in CI (#892)
74
+ - Fix Convention/Plugin pins not being updated on file change (#1028)
75
+ - Fix solargraph-rails check (#1073)
76
+ - Flow sensitive typing handles x.is_a? without an argument (#1070)
77
+ - Refactor reference pin handling (#1058)
78
+
79
+ ## 0.56.2 - July 29, 2025
80
+ - Add support for Ruby Data.define (#970)
81
+ - Ensure that pin locations are always populated (#965)
82
+ - Improve struct support (#992)
83
+ - Include Rakefile, Gemfile, and gemspec files in config by default (#984)
84
+ - Use Open3 to cache gemspecs (#1000)
85
+ - Eager load node processors (#1002)
86
+
87
+ ## 0.56.1 - July 13, 2025
88
+ - Library avoids blocking on pending yardoc caches (#990)
89
+ - DocMap checks for default Gemfile (#989)
90
+ - [Bug fix] Fixed an error in rbs/fills/tuple.rbs (#993)
91
+
92
+ ## 0.56.0 - July 1, 2025
93
+ - [regression] Gem caching perf and logging fixes #983
94
+
95
+ ## 0.55.5 - July 1, 2025
96
+ - Flatten results of DocMap external bundle query (#981)
97
+ - [breaking] Reimplement global conventions (#877)
98
+ - GemPins pin merging improvements (#946)
99
+ - Support class-scoped aliases and attributes from RBS (#952)
100
+ - Restructure ComplexType specs towards YARD doc compliance (#969)
101
+ - Use Prism (#974)
102
+ - Document pages (#977)
103
+ - Enable disabled-but-working specs (#978)
104
+ - Map RBS 'untyped' type (RBS::Types::Bases::Any) to 'undefined' (#979)
105
+ - Re-enable support for .gem_rbs_collection directories (#942)
106
+ - [breaking] Comply with YARD documentation on Hash tag format (#968)
107
+ - Ignore directory paths in Workspace#would_require? (#988)
108
+
109
+ ## 0.55.4 - June 27, 2025
110
+ - Flatten results of DocMap external bundle query (#981)
111
+
112
+ ## 0.55.3 - June 25, 2025
113
+ - Nil guards in flow-sensitive typing (patch release) (#980)
114
+
115
+ ## 0.55.2 - June 21, 2025
116
+ - Require external bundle (#972)
117
+
118
+ ## 0.55.1 - June 8, 2025
119
+ - Fix inline Struct definition (#962)
120
+ - Ensure DocMap requires bundler when loading gemspecs (#963)
121
+ - DelegatedMethod improvements (#953)
122
+
123
+ ## 0.55.0 - June 3, 2025
124
+ - Flow-sensitive typing - automatically downcast from is_a? calls (#856)
125
+ - Tuple enabler: infer literal types and use them for signature selection (#836)
126
+ - Signature selection improvements (#907)
127
+ - Add support for Ruby Structs (#939)
128
+ - [regression] Fix interface change breaking solargraph-rails (#940)
129
+ - [regression] Add back bundler/require support for solargraph-rails (#941)
130
+ - Add specs for initialize capabilities (#955)
131
+ - Create MethodAlias pins from YARD (#945)
132
+ - MessageWorker prioritizes synchronization (#956)
133
+ - initialize/new method pin cleanups (#949)
134
+ - Clip rebinds blocks when cursor is not part of receiver (#958)
135
+
136
+ ## 0.54.5 - May 17, 2025
137
+ - Repair unknown encoding errors (#936, #935)
138
+ - Index arbitrary pinsets (#937)
139
+ - Separate YARD cache from doc map cache (#938)
140
+
141
+ ## 0.54.4 - May 14, 2025
142
+ - Delete files from Library hash (#932)
143
+ - Clip#define returns variable pins (#934, #933)
144
+
145
+ ## 0.54.3 - May 13, 2025
146
+ - Improve inspect()/desc()/to_s() methods for better debugging output (#913)
147
+ - Fix generic resolution in Hash types (#906)
148
+ - Stop parsing RBS type parameter constraints as the type name (#918)
149
+ - Fix pin inference stack (#922)
150
+ - Refactor pin equality for performance (#925)
151
+ - Improve ApiMap catalog speed by preserving static pin indexes (#930)
152
+ - Update jaro_winkler dependency (#931)
153
+
154
+ ## 0.54.2 - April 28, 2025
155
+ - Resolve generics correctly on mixin inclusion (#898)
156
+ - Pick correct String#split overload (#905)
157
+ - Fix type sent into YARD method (#912)
158
+ - Early CancelRequest handling (#914)
159
+ - Destructure partial yield types (#915)
160
+ - Dependency versions (#916)
161
+
162
+ ## 0.54.1 - April 26, 2025
163
+ - Retire more RubyVM-specific code (#797)
164
+ - Add additional docs for key classes, modules and methods (#802)
165
+ - Populate location information from RBS files (#768)
166
+ - Consolidate parameter handling into Pin::Callable (#844)
167
+ - Adjust local variable presence to start after assignment, not before (#864)
168
+ - Resolve params from ref tags (#872)
169
+ - Reduce use of ComplexType.parse() to preserve rooted? information (#870)
170
+ - Ensure yield return types are qualified (#886)
171
+ - Understand type of 'def foo; @foo ||= bar; end' reader methods (#888)
172
+ - Improvements to #inspect output on pins and chains (#895)
173
+ - Block method resolution improvements (#885)
174
+ - Understand mass assignment into instance variables (#893)
175
+ - Library sync and cache invalidation (#903)
176
+ - Handle super and yield scenarios from blocks (#891)
177
+ - Allow core and stdlib documentation to be uncached (#899)
178
+ - Surface variable names in LSP, e.g., textDocument/hover (#910)
179
+ - Keep idle progress notifications alive (#911)
180
+
181
+ ## 0.54.0 - April 14, 2025
182
+ - Add support for simple block argument destructuring (#821)
183
+ - Benchmark the typecheck command (#852)
184
+ - Send Gem Caching Progress Notifications to LSP Clients (#855)
185
+ - [breaking] Fix more complex_type_spec.rb cases (#813)
186
+ - Mass assignment support - e.g., a, b = ['1', '2'] (#843)
187
+ - Memoize result of Chain#infer (#857)
188
+ - Ignore malformed mixins and overloads (#862)
189
+ - Drop Parser::ParserGem::ClassMethods#returns_from_node (#866)
190
+ - Refactor TypeChecker#argument_problems_for for type safety (#867)
191
+ - Specify more type behavior for variable reassignment (#863)
192
+ - One-step source synchronization (#871)
193
+ - Show cache progress in shell commands (#874)
194
+ - Fix miscellaneous scan errors (#875)
195
+ - Synchronous libraries (#876)
196
+ - Fix parsing of Set#classify method signature from RBS (#878)
197
+ - Sync Library#diagnose (#882)
198
+ - Doesn't false-alarm over splatted non-final args in typechecking (#883)
199
+ - Remove accidental inclusion of Module's methods in objects (#884)
200
+ - Remove another splat-related false alarm in strict typechecking (#889)
201
+ - Change require path `warn` to `debug` (#897)
202
+
203
+ ## 0.53.4 - March 30, 2025
204
+ - [regression] Restore 'Unresolved call' typecheck for stdlib objects (#849)
205
+ - Lazy dynamic rebinding (#851)
206
+ - Restore fill for Class#allocate (#848)
207
+ - [regression] Ensure YardMap gems have return type for Class<T>.new (#850)
208
+ - Create implicit .new pins in namespace method queries (#853)
209
+
210
+ ## 0.53.3 - March 29, 2025
211
+ - Remove redundant core fills (#824, #841)
212
+ - Resolve self type in variable assignments (#839)
213
+ - Eliminate splat-related false-alarms in strict typechecking (#840)
214
+ - Dynamic block binding with yieldreceiver (#842)
215
+ - Resolve generics by descending through context type (#847)
216
+
217
+ ## 0.53.2 - March 27, 2025
218
+ - Fix a self-type-related false-positive in strict typechecking (#834)
219
+ - DocMap fetches gem dependencies (#835)
220
+ - Use configured command path to spawn solargraph processes (#837)
221
+
222
+ ## 0.53.1 - March 26, 2025
223
+ - Reject nil requires in live code (#831)
224
+ - RbsMap adds mixins to current namespace (#832)
225
+
226
+ ## 0.53.0 - March 25, 2025
227
+ - Fix crash on generic methods (#762)
228
+ - Add more type annotations to the codebase (#763 et al.)
229
+ - Address remaining typecheck issues at 'typed' level and add CI task (#764)
230
+ - Fix crash during strict typechecking (#766)
231
+ - DeepInference: Fix some bugs, add docs, refactor (#767)
232
+ - Include "self type" methods like Enumerable#each from RBS files (#769)
233
+ - Handle RBS global, module alias, class variable and class instance variable declarations (#770)
234
+ - Add support for generic includes via RBS (#773)
235
+ - Handle parsing tuples of tuples in tags (#775)
236
+ - Retire the RubyVM parser (#776)
237
+ - Improve block handling in signature selection (#780)
238
+ - Require Ruby >= 3 (#791)
239
+ - Cache YARD and RBS (#781)
240
+ - Language server generates gem documentation in the background
241
+ - Fix bug handling Array(A, B) syntax while resolving generics (#784)
242
+ - Fix typeDefinitions for neovim (#792)
243
+ - Infer block-pass symbols (#793)
244
+ - Add #to_rbs methods to pins, use for better .inspect() output (#789)
245
+ - Remove deprecated commands (#790)
246
+ - Add :if support to NodeChainer for if statements as lvalues (#805)
247
+ - Fix ApiMap::Cache (#806)
248
+ - Map mixins from RBS (#808)
249
+ - Fix issue with wrong signature selection by call with block node (#815)
250
+ - Keep gem pins in memory (#811)
251
+ - Refactor gems command (#816)
252
+ - Use return type of literal blocks in inference (#818)
253
+ - Insert Module methods (#820)
254
+ - Revise documentation formatting (#823)
255
+
256
+ ## 0.52.0 - February 28, 2025
257
+ - Chains resolve identical names with different contexts (#679)
258
+ - Handle symbol tags in method tag values (#744)
259
+ - Infer more specific Array types when possible (#745)
260
+ - Handle interpolated symbol literals (#747)
261
+ - Handle combined conditions, else clauses in case statements (#746)
262
+ - fix: support find require xxx.rb in local workspace. (#722)
263
+ - Don't require redundant attribute @return and @param tags (#748)
264
+ - Use @yieldreturn tags for type inference (#749)
265
+ - Fix type annotations identified at 'typed' level (#750)
266
+ - Support RBS class aliases (#751)
267
+ - Better support for generics via Class @param tags (#743)
268
+ - Generic module support through RBS (#757)
269
+ - Fix inference of begin expression types (#754)
270
+ - Add argument to satisfy typechecker on which signature to use (#755)
271
+ - Fix RBS ingestion implicit initializer issues, missing param types (#756)
272
+ - Validate zsuper arity
273
+ - Use yard-solargraph plugin (#759)
274
+ - Add missing RBS types
275
+
276
+ ## 0.51.2 - February 1, 2025
277
+ - Fix exception from parser when anonymous block forwarding is used (#740)
278
+ - Parameterized Object types
279
+ - Remove extraneous comment from method examples
280
+
281
+ ## 0.51.1 - January 23, 2025
282
+ - Format example code
283
+ - Block infers yieldreceiver from chain
284
+
285
+ ## 0.51.0 - January 19, 2025
286
+ - Resolve self in yieldreceiver tags
287
+ - Include absolute paths in config (#674)
288
+ - Enable diagnostics by default
289
+ - Fix cache resolution (#704)
290
+ - Modify rubocop option for rubocop < 1.30 (#665)
291
+ - Include absolute paths in config (#674)
292
+ - Enable diagnostics by default
293
+ - Remove RSpec convention (#716)
294
+ - Include convention pins in document_symbols (#724)
295
+ - Implement Go To Type Definition (#717)
296
+ - Remove e2mmap dependency (#699)
297
+ - Update rbs to 3.0
298
+ - Relax reverse_markdown dependency (#729)
299
+ - Fix Ruby 3.4 and move all parsing to whitequark (#739)
300
+ - Add Pin::DelegatedMethod (#602)
301
+ - Complete global methods from a file inside namespaces (#714)
302
+ - gemspec dashes and required path slashes (#697)
303
+
1
304
  ## 0.50.0 - December 5, 2023
2
305
  - Remove .travis.yml as its not longer used (#627)
3
306
  - Fix empty string case when processing requires (#644)
@@ -569,7 +872,7 @@
569
872
  ## 0.31.2 - January 27, 2019
570
873
  - Use YARD documentation rules to associate directives with namespaces
571
874
  - Handle non-unique pin locations in completionItem/resolve
572
- - Clip#complete handles @yieldself and @yieldpublic contexts
875
+ - Clip#complete handles @yieldreceiver and @yieldpublic contexts
573
876
  - Host::Dispatch filters library updates (castwide/vscode-solargraph#99)
574
877
  - Qualify included namespaces (#148)
575
878
 
@@ -925,7 +1228,7 @@
925
1228
 
926
1229
  ## 0.17.0 - February 1, 2018
927
1230
  - Support Solargraph configurations in workspace folders.
928
- - Use @yieldself tag to change block contexts.
1231
+ - Use @yieldreceiver tag to change block contexts.
929
1232
  - Handle whitespace in signatures.
930
1233
  - Convert 'self' when inferring signature types.
931
1234
  - Handle bare periods without signatures.
@@ -968,7 +1271,7 @@
968
1271
  - Map pins to code objects.
969
1272
  - Infer return types from domain (DSL) methods.
970
1273
  - Fixed visibility and results for superclasses.
971
- - Experimental @yieldself tag.
1274
+ - Experimental @yieldreceiver tag.
972
1275
  - Improved syntax error handling in Source.fix.
973
1276
  - Gem ships with Ruby 2.2.2 yardocs.
974
1277
  - Experimental plugin architecture and Runtime plugin.
data/README.md CHANGED
@@ -34,6 +34,7 @@ Plug-ins and extensions are available for the following editors:
34
34
  * Instructions: https://lsp.sublimetext.io/language_servers/#solargraph
35
35
 
36
36
  * **Vim**
37
+ * Github: `nvim-lspconfig`, https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md#solargraph
37
38
  * GitHub: `LanguageClient-neovim`, https://github.com/autozimu/LanguageClient-neovim
38
39
  * GitHub: `coc`, https://github.com/neoclide/coc-solargraph
39
40
  * GitHub: `Vim-EasyComplete`, https://github.com/jayli/vim-easycomplete
@@ -50,37 +51,43 @@ Plug-ins and extensions are available for the following editors:
50
51
 
51
52
  Solargraph's behavior can be controlled via optional [configuration](https://solargraph.org/guides/configuration) files. The highest priority file is a `.solargraph.yml` file at the root of the project. If not present, any global configuration at `~/.config/solargraph/config.yml` will apply. The path to the global configuration can be overridden with the `SOLARGRAPH_GLOBAL_CONFIG` environment variable.
52
53
 
53
- ### Rails Support
54
+ ### Plugins
55
+
56
+ Solargraph supports [plugins](https://solargraph.org/guides/plugins) that implement their own Solargraph features, such as diagnostics reporters and conventions to provide LSP features and type-checking, e.g. for frameworks which use metaprogramming and/or DSLs.
57
+
54
58
  For better Rails support, please consider using [solargraph-rails](https://github.com/iftheshoefritz/solargraph-rails/)
55
59
 
56
- ### Gem Support
60
+ The RSpec framework is supported via [solargraph-rspec](https://github.com/lekemula/solargraph-rspec/)
57
61
 
58
- Solargraph is capable of providing code completion and documentation for gems that have YARD documentation. You can make sure your gems are documented by running `yard gems` from the command line. (YARD is included as one of Solargraph's gem dependencies. The first time you run it might take a while if you have a lot of gems installed).
62
+ ### Gem Support
59
63
 
60
- When editing code, a `require` call that references a gem will pull the documentation into the code maps and include the gem's API in code completion and intellisense.
64
+ **Note: Before version 0.53.0, it was recommended to run `yard gems` periodically or automate it with `yard config` to ensure that Solargraph had access to gem documentation. These steps are no longer necessary. Solargraph maintains its own gem documentation cache independent of the yardocs in your gem installations.**
61
65
 
62
- If your project automatically requires bundled gems (e.g., `require 'bundler/require'`), Solargraph will add all of the Gemfile's default dependencies to the map.
66
+ When editing code, a `require` call that references a gem will pull the documentation into the code maps and include the gem's API in code completion and intellisense. Solargraph automatically generates code maps from installed gems, based on the YARD or RBS type information inside the gem. You can also eagerly cache gem documentation with the `solargraph gems` command.
63
67
 
64
- ### Type Checking
68
+ If your project automatically requires bundled gem with the `Bundler.require` statement, Solargraph will add all of the Gemfile's default dependencies to the map.
65
69
 
66
- As of version 0.33.0, Solargraph includes a [type checker](https://github.com/castwide/solargraph/issues/192) that uses a combination of YARD tags and code analysis to report missing type definitions. In strict mode, it performs type inference to determine whether the tags match the types it detects from code.
70
+ To ensure you have types for gems which contain neither RBS nor YARD
71
+ information, use
72
+ [gem\_rbs\_collection](https://github.com/ruby/gem_rbs_collection) to
73
+ install a community-supported set of RBS types for various gems:
67
74
 
68
- ### Updating Core Documentation
75
+ ```sh
76
+ bundle exec rbs collection init
77
+ bundle exec rbs collection install
78
+ ```
69
79
 
70
- As of version 0.49.0, Solargraph uses [rbs](https://github.com/ruby/rbs) for core and stdlib documentation. The following only applies to prior versions.
80
+ Once installed, you can also insert your own local overrides and definitions in RBS in a directory configured in the `rbs_collection.yaml` that the above commands create.
71
81
 
72
- The Solargraph gem ships with documentation for Ruby 2.2.2. You can download documentation for other Ruby versions from the command line.
82
+ ### Type Checking
73
83
 
74
- $ solargraph list-cores # List the installed documentation versions
75
- $ solargraph available-cores # List the versions available for download
76
- $ solargraph download-core # Install the best match for your Ruby version
77
- $ solargraph clear # Reset the documentation cache
84
+ As of version 0.33.0, Solargraph includes a [type checker](https://github.com/castwide/solargraph/issues/192) that uses a combination of YARD tags and code analysis to report missing type definitions. In strict mode, it performs type inference to determine whether the tags match the types it detects from code. In strong mode it will ask you to clarify your intentions by adding annotations for better validation.
78
85
 
79
86
  ### The Documentation Cache
80
87
 
81
- Solargraph uses a cache directory to store documentation for the Ruby core and customized documentation for certain gems. The default location is `~/.solargraph/cache`, e.g., `/home/<username>/.solargraph/cache` on Linux or `C:\Users\<username>\.solargraph` on Windows.
88
+ Solargraph uses a cache directory to store documentation for the Ruby core and gems. The default location is `~/.cache/solargraph`, e.g., `/home/<username>/.cache/solargraph` on Linux or `C:\Users\<username>\.cache\solargraph` on Windows.
82
89
 
83
- You can change the location of the cache directory with the `SOLARGRAPH_CACHE` environment variable. This can be useful if you want the cache to comply with the XDG Base Directory Specification.
90
+ You can change the location of the cache directory with the `SOLARGRAPH_CACHE` environment variable.
84
91
 
85
92
  ### Solargraph and Bundler
86
93
 
@@ -90,11 +97,11 @@ In the Gemfile:
90
97
 
91
98
  gem 'solargraph', group: :development
92
99
 
93
- Run `bundle install` and use `bundle exec yard gems` to generate the documentation. This process documents cached or vendored gems, or even gems that are installed from a local path.
100
+ Run `bundle install` and optionally use `bundle exec solargraph gems` to generate the documentation. This process documents cached or vendored gems, or even gems that are installed from a local path.
94
101
 
95
102
  In order to make sure you're using the correct dependencies, you can start the language server with Bundler. In VS Code, there's a `solargraph.useBundler` option. Other clients will vary, but the command you probably want to run is `bundle exec solargraph socket` or `bundle exec solargraph stdio`.
96
103
 
97
- ### Rubocop Version
104
+ ### RuboCop Version
98
105
 
99
106
  If you have multiple versions of [`rubocop`](https://rubygems.org/gems/rubocop) installed and you would like to choose a version other than the latest to use, this specific version can be configured.
100
107
 
@@ -125,6 +132,10 @@ See [https://solargraph.org/guides](https://solargraph.org/guides) for more tips
125
132
 
126
133
  ### Development
127
134
 
135
+ To see more logging when typechecking or running specs, set the
136
+ `SOLARGRAPH_LOG` environment variable to `debug` or `info`. `warn` is
137
+ the default value.
138
+
128
139
  Code contributions are always appreciated. Feel free to fork the repo and submit pull requests. Check for open issues that could use help. Start new issues to discuss changes that have a major impact on the code or require large time commitments.
129
140
 
130
141
  ### Sponsorship and Donation
data/Rakefile CHANGED
@@ -1,12 +1,7 @@
1
1
  require 'rake'
2
- require 'rspec/core/rake_task'
3
2
  require 'bundler/gem_tasks'
4
-
5
- begin
6
- require 'rspec/core/rake_task'
7
- RSpec::Core::RakeTask.new(:spec)
8
- rescue LoadError
9
- end
3
+ require 'fileutils'
4
+ require 'open3'
10
5
 
11
6
  desc "Open a Pry session preloaded with this library"
12
7
  task :console do
@@ -14,12 +9,129 @@ task :console do
14
9
  end
15
10
 
16
11
  desc "Run the type checker"
17
- task :typecheck do
18
- sh "bundle exec solargraph typecheck --level typed"
12
+ task typecheck: [:typecheck_strong]
13
+
14
+ desc "Run the type checker at typed level - return code issues provable without annotations being correct"
15
+ task :typecheck_typed do
16
+ sh "SOLARGRAPH_ASSERTS=on bundle exec solargraph typecheck --level typed"
17
+ end
18
+
19
+ desc "Run the type checker at strict level - report issues using type annotations"
20
+ task :typecheck_strict do
21
+ sh "SOLARGRAPH_ASSERTS=on bundle exec solargraph typecheck --level strict"
22
+ end
23
+
24
+ desc "Run the type checker at strong level - enforce that type annotations exist"
25
+ task :typecheck_strong do
26
+ sh "SOLARGRAPH_ASSERTS=on bundle exec solargraph typecheck --level strong"
27
+ end
28
+
29
+ desc "Run the type checker at alpha level - run high-false-alarm checks"
30
+ task :typecheck_alpha do
31
+ sh "SOLARGRAPH_ASSERTS=on bundle exec solargraph typecheck --level alpha"
32
+ end
33
+
34
+ desc "Run RSpec tests, starting with the ones that failed last time"
35
+ task spec: %i[spec_failed undercover_no_fail full_spec] do
36
+ undercover
37
+ end
38
+
39
+ desc "Run all RSpec tests"
40
+ task :full_spec do
41
+ warn 'starting spec'
42
+ sh 'TEST_COVERAGE_COMMAND_NAME=full-new bundle exec rspec' # --profile'
43
+ warn 'ending spec'
44
+ # move coverage/full-new to coverage/full on success so that we
45
+ # always have the last successful run's 'coverage info
46
+ FileUtils.rm_rf('coverage/full')
47
+ FileUtils.mv('coverage/full-new', 'coverage/full')
48
+ end
49
+
50
+ # @sg-ignore #undercover return type could not be inferred
51
+ # @return [Process::Status]
52
+ def undercover
53
+ simplecov_collate
54
+ cmd = 'bundle exec undercover ' \
55
+ '--simplecov coverage/combined/coverage.json ' \
56
+ '--exclude-files "Rakefile,spec/*,spec/**/*,lib/solargraph/version.rb" ' \
57
+ '--compare origin/master'
58
+ output, status = Bundler.with_unbundled_env do
59
+ Open3.capture2e(cmd)
60
+ end
61
+ puts output
62
+ $stdout.flush
63
+ status
64
+ rescue StandardError => e
65
+ warn "hit error: #{e.message}"
66
+ warn "Backtrace:\n#{e.backtrace.join("\n")}"
67
+ warn "output: #{output}"
68
+ puts "Flushing"
69
+ $stdout.flush
70
+ raise
71
+ end
72
+
73
+ desc "Check PR coverage"
74
+ task :undercover do
75
+ raise "Undercover failed" unless undercover.success?
76
+ end
77
+
78
+ desc "Branch-focused fast-feedback quality/spec/coverage checks"
79
+ task test: %i[overcommit spec typecheck] do
80
+ # do these in order
81
+ Rake::Task['typecheck_strict'].invoke
82
+ Rake::Task['typecheck_strong'].invoke
83
+ Rake::Task['typecheck_alpha'].invoke
84
+ end
85
+
86
+ desc "Re-run failed specs. Add --fail-fast in your .rspec-local file if desired."
87
+ task :spec_failed do
88
+ # allow user to check out any persistent failures while looking for
89
+ # more in the whole test suite
90
+ sh 'TEST_COVERAGE_COMMAND_NAME=next-failure bundle exec rspec --only-failures || true'
91
+ end
92
+
93
+ desc "Run undercover and show output without failing the task if it fails"
94
+ task :undercover_no_fail do
95
+ undercover
96
+ rescue StandardError
97
+ puts "Undercover failed, but continuing with other tasks."
98
+ end
99
+
100
+ # @return [void]
101
+ def simplecov_collate
102
+ require 'simplecov'
103
+ require 'simplecov-lcov'
104
+ require 'undercover/simplecov_formatter'
105
+
106
+ SimpleCov.collate(Dir["coverage/{next-failure,full,ad-hoc}/.resultset.json"]) do
107
+ cname = 'combined'
108
+ command_name cname
109
+ new_dir = File.join('coverage', cname)
110
+ coverage_dir new_dir
111
+
112
+ formatter \
113
+ SimpleCov::Formatter::MultiFormatter
114
+ .new([
115
+ SimpleCov::Formatter::HTMLFormatter,
116
+ SimpleCov::Formatter::Undercover,
117
+ SimpleCov::Formatter::LcovFormatter
118
+ ])
119
+ SimpleCov::Formatter::LcovFormatter.config.report_with_single_file = true
120
+ end
121
+ puts "Simplecov collated results into coverage/combined/.resultset.json"
122
+ rescue StandardError => e
123
+ puts "Simplecov collate failed: #{e.message}"
124
+ ensure
125
+ $stdout.flush
126
+ end
127
+
128
+ desc 'Add incremental coverage for rapid iteration with undercover'
129
+ task :simplecov_collate do
130
+ simplecov_collate
19
131
  end
20
132
 
21
- desc "Run all tests"
22
- task :test do
23
- Rake::Task["typecheck"].invoke
24
- Rake::Task["spec"].invoke
133
+ desc "Show quality checks on this development branch so far, including any staged files"
134
+ task :overcommit do
135
+ # OVERCOMMIT_DEBUG=1 will show more detail
136
+ sh 'SOLARGRAPH_ASSERTS=on bundle exec overcommit --run --diff origin/master'
25
137
  end
data/SPONSORS.md CHANGED
@@ -4,14 +4,7 @@ Solargraph is developed and maintained by [Castwide Technologies](https://castwi
4
4
 
5
5
  The following people and organizations provide funding or other resources. [Become a sponsor](https://patreon.com/castwide)
6
6
 
7
- ## Linked Sponsors
8
-
9
- - **[Calyptix Security](https://www.calyptix.com/)**
10
- - **[Lightward](https://lightward.com)**
11
-
12
7
  ## Named Sponsors
13
8
 
14
- - Akira Yamada
15
- - Jesus Castello
16
- - Joel Drapper
17
- - Spencer
9
+ - Juan Carlos
10
+ - Vince Broz
data/bin/solargraph CHANGED
@@ -1,5 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
+ # turn off warning diagnostics from Ruby
4
+ $VERBOSE=nil
5
+
3
6
  require 'solargraph'
4
7
 
5
8
  Solargraph::Shell.start(ARGV)