Page MenuHomePhabricator

[analyzer] Fix exporting SARIF files from scan-build on Windows

Authored by jranieri-grammatech on Jul 24 2019, 7:18 AM.



In Perl, -z is defined as checking if a "file has zero size" and makes no mention what it does when given a directory. It looks like the behavior differs across platforms, which is why on Windows the SARIF file was always being deleted.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptJul 24 2019, 7:18 AM

Oops. It looks like there's another place where this pattern shows up (see rC139382). The other one should probably be changed as well.

(Thanks for diverging from test(1), perl…)

Update an additional place that used -z.

NoQ accepted this revision.Jul 24 2019, 12:13 PM


This revision is now accepted and ready to land.Jul 24 2019, 12:13 PM
aaron.ballman accepted this revision.Jul 24 2019, 12:42 PM

LGTM! Do you need someone to commit on your behalf?

LGTM! Do you need someone to commit on your behalf?


aaron.ballman closed this revision.Jul 24 2019, 1:03 PM

I've commit on your behalf in r366941, thank you for the patch!

NoQ added inline comments.Aug 7 2019, 5:18 PM

Whoops. I suspect that we're now unconditionally deleting all plist output, which isn't exactly what we wanted. I think we actually wanted to delete empty plist files here.

jranieri-grammatech marked an inline comment as done.Aug 9 2019, 5:29 AM
jranieri-grammatech added inline comments.

Er, I think you're right. I was out of the office the last few days, but it looks like you've addressed this in rC368338. Thanks!