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
With the latest version 0.36.0 (using Parser 2.3.0.1, running on ruby 2.3.0 x86_64-darwin15) on OSX I am getting the following when an offence is cached:
Looking at a serialized offence, the severity seems to not be serialized as a string, but as an object:
[{"severity":{"name":"convention"},"location":{"begin_pos":24672,"end_pos":25005},"message":"Use 2 spaces for indentation in an array, relative to the first position after the preceding left parenthesis.","cop_name":"Style/IndentArray","status":"uncorrected"}, <omitted>]
Removing the cache directory allows it to run properly once since there is no cache to use.
I am still unsure wether this is caused by something in my environment or is a more general problem. The 0.34.2 version was working as expected without this problem.
The text was updated successfully, but these errors were encountered:
Turns out this is caused by the Oj gem and the way it handles serialization of 'plain' objects. The normal json lib calls #to_s, but Oj (by default) converts the object to a hash using its instance methods. The latter can be configured but there is no option to call #to_s as a last resort.
With the latest version
0.36.0 (using Parser 2.3.0.1, running on ruby 2.3.0 x86_64-darwin15)
on OSX I am getting the following when an offence is cached:Looking at a serialized offence, the
severity
seems to not be serialized as a string, but as an object:Removing the cache directory allows it to run properly once since there is no cache to use.
I am still unsure wether this is caused by something in my environment or is a more general problem. The
0.34.2
version was working as expected without this problem.The text was updated successfully, but these errors were encountered: