lib/cc/analyzer/source_fingerprint.rb in codeclimate-0.32.0 vs lib/cc/analyzer/source_fingerprint.rb in codeclimate-0.32.1
- old
+ new
@@ -26,10 +26,15 @@
source.encode(Encoding::UTF_8, "binary", invalid: :replace, undef: :replace, replace: "")
end
end
def raw_source
- @raw_source ||= File.read(issue.path)
+ @raw_source ||=
+ if File.file?(issue.path)
+ File.read(issue.path)
+ else
+ ""
+ end
end
end
end
end