Skip to content

Add Performance/Rubyzip Cop

Matthias Käppler requested to merge mk-rubyzip-cop into master

This cop flags potentially costly operations on ZIP archives (new, open and foreach) that read the file's Central Directory into memory entirely.

I disabled the cop in specs/ since we know zip fixtures to be small and easy to work with. It's really mostly a problem in production where this may cause runaway memory use on user-uploaded data.

References:

Edited by Matthias Käppler

Merge request reports

Loading