RFR: 1236: Add jcheck option to check for large binary files [v5]
Kevin Rushforth
kcr at openjdk.java.net
Mon Dec 6 17:21:55 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.
How is this diff generated? The commit itself does have the complete information. Here is a test I just did in the jfx repo:
$ git diff --no-renames --binary HEAD
diff --git a/tests/manual/web/dnd/blue_renamed.png b/tests/manual/web/dnd/blue_renamed.png
new file mode 100644
index 0000000000000000000000000000000000000000..d8f1d7de2baf7851a8c63506709ea0b83806c172
GIT binary patch
literal 207
zcmeAS at N?(olHy`uVBq!ia0vp^4j|0I1SD0tpLGJMX`U{QAsLNtZyEA7I54mrd~CX>
zH9xbkMOI6SW#R%xl?RMmDgilmHv<c9-{0`=eA$ydm*<8V`%4~sy3;D=f2Qfu`(HiJ
zS-0N%FrCqaIfLy2&jLvY<AyYbvkbFH5zt<HNw_Y<G<Dvk%){mT>luqo1)RTg`Mv?V
OkipZ{&t;ucLK6Uiphv*~
literal 0
HcmV?d00001
diff --git a/tests/manual/web/dnd/red_copied.png b/tests/manual/web/dnd/red_copied.png
new file mode 100644
index 0000000000000000000000000000000000000000..66d776a846d3671512c5afba2623fb3a0dac847e
GIT binary patch
literal 284
zcmeAS at N?(olHy`uVBq!ia0vp^4j|0I1SD0tpLGJM$DS^ZAsLNtFDh~!N?>Sv_&55Z
z(KclXF&Vv%@QqP1qHJdUiWyh3Iht}g+EfoF{kYt;ZmsUw2b?7jQ$N_M|A at 2OynoyI
z$7SCvdS30mEPu_v%c6JMO!1iob<yo-yXSqGy`i%Iba5Q(y{v$5d4H!D-b##}RpZ3}
z^4L=LlBEo at m@>E)Xf`Y(i}5VVexdoF^S?Tyk7Q<7{dCU0qvW^u=({Q52RG;)e&*}{
itMTjP(<Q>XoB98W>z)d%Zc+kzm%-E3&t;ucLK6Tl6m?4g
literal 0
HcmV?d00001
-------------
PR: https://git.openjdk.java.net/skara/pull/1247
More information about the skara-dev
mailing list