RFR: 1236: Add jcheck option to check for large binary files [v5]

Kevin Rushforth kcr at openjdk.java.net
Tue Dec 7 22:34:47 UTC 2021


On Fri, 3 Dec 2021 13:16:28 GMT, Guoxiong Li <gli at openjdk.org> wrote:

>> Hi all,
>>
>> This patch adds the large binary file check to the jcheck.
>>
>> The corresponding configuration is like the following code. Each key/value in the `[checks "binary"]` is a mapper. The `key` means the file pattern and the `value` means the limited file size. For example, `.*\.bin=200B` means the file which ends with `.bin` should not exceed 200 Bytes.
>>
>>
>> [checks]
>> error = binary
>>
>> [checks "binary"]
>> .*.bin=200B
>> .*.o=1k
>>
>>
>> The limited file size can use one of these several units:  b(Byte), kb(KiloByte), mb(MegaByte), gb(GigaByte). The units is case insensitive, which means the `Kb`, `kB` and `KB` are equals to `kb(KiloByte)`. If the unit is not provided, it defauts to `b(Byte)`. And these is no a unit called `bit`.
>>
>> The corresponding test cases are added.
>>
>> Best Regards,
>> -- Guoxiong
>
> Guoxiong Li has updated the pull request incrementally with two additional commits since the last revision:
>
>  - Fix the output message.
>  - Check the renamed/modified binary file.

No, I don't know. And one thing I should mention is that there are almost certainly other cases where you do want `git diff` to do rename detection (`webrev` comes to mind), so I recommend only inhibiting rename detection when checking binary files.

-------------

PR: https://git.openjdk.java.net/skara/pull/1247



More information about the skara-dev mailing list