-
Notifications
You must be signed in to change notification settings - Fork 225
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
Undefined method `split' for nil:nilClass (NoMethodError) #12
Comments
Can you figure out what file is causing it? That would be great. |
It happens when running against the FFI gem in 'vendor': ffi-1.9.3. The method is in flog.rb, line 48:
I can certainly submit a PR to ignore lines if they are nil but I'm not sure that is the best way to handle this. Thoughts? The 'context' is Looks like the file is: |
PS: This may just go away if we can ignore 'vendor'. I don't think anyone will want to critique their 'vendor' directory. |
Yeah, we don't want to ignore that. We want a location for every smell, otherwise we can't show it in the file report. Like I said on issue #11, running |
Unfortunately Also, it is not a Rails app that I'm testing against. It is Sinatra, but I also get the same error on the same |
I also see a lot of errors like this, with a command line of
|
I still haven't looked into that fii gem file that's causing this issue, but I just pushed a new version that should allow you to run Also, I've never vendored my gems, so when you spoke of a vendor folder, I immediately thought of Rails. As for those errors, they occur when files are unparsable. Those errors get reported multiple times by the various gems wrapped by RubyCritic. I know that Flog has a |
This has somewhat been fixed upstream. Given the following code: describe "Callback" do
module LibTest
extend FFI::Library
end
end Running
That However, using Flog's option to skip code outside of methods, the Running
And there you have it. Luckily, RubyCritic already uses this option so all Flog smells should have files and lines. I consider this fixed for now, but if this type of error ever comes up again, please feel free to reopen. |
I am getting the following error consistently when running rubycritic on a particular project:
I will dig further but wanted to submit this to see if anyone else has seen it.
The text was updated successfully, but these errors were encountered: