On Mon, 24 Oct 2022 19:39:21 GMT, Jonathan Gibbons <j...@openjdk.org> wrote:

> I think it would be better to try and remove incidental trailing whitespace 
> first, before encoding any remaining whitespace. Hiding the trailing 
> whitespace as a Unicode escape seems like a bad idea, equivalent to sweeping 
> the issue under the rug. While I agree with the goals of improving the check, 
> I think this is going about it the wrong way, or at least in the wrong order.

I respectfully disagree. I think changing a trailing " " into a "\u0020" is the 
opposite of hiding it; it is making it plainly visible. In fact, I believe most 
of these trailing spaces are the result of them not being visible enough (and 
the tooling not warning).

Secondly, there are a lot of definitely unintentional trailing spaces, in 
comments and blank lines. I'd say there is factor 10:1 more of these. Getting 
these out of the way allows developers to focus more clearly on the trailing 
whitespace that matters: those in the key-value pairs.

And as I said, I intend to file follow-up issues for all files where there is a 
trailing unicode-sequence whitespace, so it will definitely not be lost on the 
respective component teams that they have something they need to address.

> Maybe it would be a good idea to first validate the default/English files, 
> checking for incidental whitespace there, then check localized versions of 
> each property against the English version.

That's probably a good idea, but I think we should leave that to each 
respective team. Just like Andy's and Naoto's suggestion of improving i18n 
tooling to detect issues like this earlier on. Good idea, but I'd like to see 
that implemented separated from this PR. This PR is already large. The only 
reason it makes sense is because all changes (except the one to jcheck) are 
automatically generated and trivial to verify correctness of. If we were to 
start adding individual, manual changes into this PR, it would be just a huge 
mess.

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

PR: https://git.openjdk.org/jdk/pull/10792

Reply via email to