RFR: 1236: Add jcheck option to check for large binary files [v5]
Magnus Ihse Bursie
ihse at openjdk.java.net
Fri Dec 3 17:16:07 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.
I just want to confirm that Erik is correct. You need to check even updated and renamed files.
I also want to confirm that I don't think getting a warning level should hold up this PR. As I said, we don't currently support warnings, and the entire concept needs to be developed, for all stages, up to and including how to present them to the user in the GitHub UI, before we can start to actually emit any warnings. I still think this would be a good thing to have, though.
-------------
PR: https://git.openjdk.java.net/skara/pull/1247
More information about the skara-dev
mailing list