Closed fnareoh closed 8 months ago
Attention: 5 lines
in your changes are missing coverage. Please review.
Comparison is base (
68180d6
) 91.60% compared to head (a3bab0f
) 91.54%.
Files | Patch % | Lines |
---|---|---|
ggshield/core/scan/scannable.py | 80.95% | 4 Missing :warning: |
ggshield/verticals/secret/secret_scanner.py | 85.71% | 1 Missing :warning: |
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Aims at fixing the issue with scanning large documents where chunks can end up being larger than the maximum server payload, first reported in #555.
Depends on a change to py-gitguardian, see PR here, to pass the server payload to the GGClient.
To facilitate the computation of chunk size an utf8_encoded_size property was added and calls a new method _read_content. Some of the code is a bit clunky with
if self.content is None
statement even tough we just called a read method to make sure it wouldn't be None, but this way pyright doesn't complain.I left a constant margin in the chunk size to encode the metadata and tested it with a scan of 10 000 files of 1Kb but it might be better to have it adapt depending on the number of files in the chunk ?