<i18n dev> RFR: 8325558: Add jcheck whitespace checking for properties files
Joe Wang
joehw at openjdk.org
Mon Feb 12 20:26:00 UTC 2024
On Fri, 9 Feb 2024 13:46:06 GMT, Magnus Ihse Bursie <ihse at openjdk.org> wrote:
>> This is an attempt to finally implement the idea brought forward in JDK-8295729: Properties files is essentially source code. It should have the same whitespace checks as all other source code, so we don't get spurious trailing whitespace changes or leading tabs instead of spaces.
>>
>> With Skara jcheck, it is possible to increase the coverage of the whitespace checks.
>>
>> However, this turned out to be problematic, since trailing whitespace is significant in properties files. That issue has mostly been sorted out in a series of PRs, and this patch will finish the job with the few remaining files, and actually enable the check in jcheck.
>
> src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages.properties line 24:
>
>> 22: # Messages for message reporting
>> 23: BadMessageKey = The error message corresponding to the message key can not be found.
>> 24: FormatFailed = An internal error occurred while formatting the following message:\n
>
> Same here with `:\n`...
It's done with the code (that is, a key is appended with the code). In fact, the whole Xerces stack was implemented this way. I'd leave it as is.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17789#discussion_r1486731927
More information about the i18n-dev
mailing list