You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello , I noticed that the plugin google-java-format does not change names which contains non ASCII chars.
According to, google-java-style it should change them or warning, but it doesn't do that. How do I fix it?
Thanks and have a nice day :)
? g-j-f only makes whitespace changes at this time, and that is working as intended. The formatter couldn't possibly make reasonable decisions here when it encounters non ASCII identifiers; that really requires a human's touch.
@lowasser Is it possible that @peewe is asking why g-j-f doesn’t replace the non-ASCII versions of characters [a-z0-9A-Z] with their ASCII equivalents.
I don't know whether this is a desired feature or not, but it does at least some like something which requires less of a human touch.
This change could only be made for private symbols, and even then could
theoretically break reflection. I think it's far outside the realm of
things a code formatter should do.
checkstyle <http://checkstyle.sourceforge.net/google_style.html> is good at
reporting style guide violations. That's what it does (as the name of the
tool suggests).
What google-java-format does (as *its* name suggests) is *format* code. It
doesn't care whether you use a Mongolian vowel separator in your variable
names.
Activity
lowasser commentedon Apr 4, 2017
? g-j-f only makes whitespace changes at this time, and that is working as intended. The formatter couldn't possibly make reasonable decisions here when it encounters non ASCII identifiers; that really requires a human's touch.
alexkleiman commentedon Apr 4, 2017
@lowasser Is it possible that @peewe is asking why g-j-f doesn’t replace the non-ASCII versions of characters [a-z0-9A-Z] with their ASCII equivalents.
I don't know whether this is a desired feature or not, but it does at least some like something which requires less of a human touch.
kevinb9n commentedon Apr 4, 2017
sormuras commentedon Apr 4, 2017
GJF could emit a warning.
kevinb9n commentedon Apr 4, 2017
sormuras commentedon Apr 4, 2017
Point taken.
sormuras commentedon Apr 4, 2017
Is the same reasoning applicable to not consider a validation mode described in #105 (and implemented in #106)?
kevinb9n commentedon Apr 4, 2017
No, I think validation is fine as long as people understand that it means both much more and much less than validating style correctness.