You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.
When running the linter on a ruby file, I got this error on the console [Linter] Error running Code Climate TypeError: Cannot convert undefined or null to object
After some investigation, the root cause was this line in index.js file.
It's trying to access issue.location, but the issue object has no location key.
That's the output of running codeclimate -f json /path/to/file.rb
Great catch! I think your proposal looks correct and I’d be happy to merge a PR that makes that change. Ideally, you would include a test that exercises this logic, but if that proves difficult please open the PR anyway
The codeclimate provider for Linter
it works with a valid .codeclimate.yml file
Expected promise to be resolved, but it was rejected with: Cannot convert undefined or null to object { }
But it passes now.
Since the test is checking for the messages returned from the linter, not from codeclimate, I couldn't write a scenario for it.
I'm using CodeClimate version 0.70.3
When running the linter on a ruby file, I got this error on the console
[Linter] Error running Code Climate TypeError: Cannot convert undefined or null to object
After some investigation, the root cause was this line in
index.js
file.It's trying to access
issue.location
, but the issue object has nolocation
key.That's the output of running
codeclimate -f json /path/to/file.rb
You can notice that the first element in the output is of type
measurments
notIssue
, this has been recently introduced in codeclimate json formatter.So as a quick solution, I just added this condition inside the
forEach
blockWe may also filter the
messages
before callingforEach
.Do you have a specific guide to create a pull request with this fix?
The text was updated successfully, but these errors were encountered: