New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
solargraph scan crashes when scanning ffi_c's Pointer.c file #634
Comments
|
Does anyone know how to skip past this file? I tried the following exclusion patterns: |
|
This patch should fix it diff --git a/lib/solargraph/complex_type.rb b/lib/solargraph/complex_type.rb
index 32574ec8..89dfaa6c 100644
--- a/lib/solargraph/complex_type.rb
+++ b/lib/solargraph/complex_type.rb
@@ -169,7 +169,7 @@ module Solargraph
paren_stack = 0
base = String.new
subtype_string = String.new
- type_string.each_char do |char|
+ type_string&.each_char do |char|
if char == '='
#raise ComplexTypeError, "Invalid = in type #{type_string}" unless curly_stack > 0
elsif char == '<' |
gastonmorixe
added a commit
to rocketreferrals/solargraph
that referenced
this issue
Aug 12, 2023
|
+1 on this issue! |
|
Upgrading ffi to 1.16.2 fixed this issue for me. |
castwide
pushed a commit
that referenced
this issue
Nov 5, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When running
solargraph scanusing the latest code frommasterI end up with the following crash when scanning code:Looks like somehow
type_stringis becoming an object in the block that does not have the.each_charmethod associated with that object.The text was updated successfully, but these errors were encountered: