When gradle format is run on entire repository, 3 files are updated. However, this only messes up non-ascii strings. For reference, see https://github.com/kedar-joshi/spring-boot/commit/bc30fc26f21a4aaa4b51ab0a092c981478be438e.

Running .\gradlew format produces following output -

D:\OSS\spring-boot>.\gradlew format               

BUILD SUCCESSFUL in 18s
211 actionable tasks: 211 executed

.. but it also modifies three files where the only change is in non-ascii strings. Ideally, formatter should not change the contents of Java strings.

Environment JDK : Oracle JDK 8 OS : Windows 10 Pro (64 Bit) Locale : en_IN Charset : Latin-1 (ISO-8859-1).

Comment From: snicoll

@kedar-joshi I just ran this command on master and no file was changed:

➜  spring-boot/master git:(master) ./gradlew format

BUILD SUCCESSFUL in 5s
211 actionable tasks: 211 executed

Can you be a bit more specific?

Comment From: kedar-joshi

Can you be a bit more specific?

When I run .\gradlew format I also get following output -

D:\OSS\spring-boot>.\gradlew format               

BUILD SUCCESSFUL in 18s
211 actionable tasks: 211 executed

.. but running this task also modifies three files with only change in non-ascii strings.

Comment From: wilkinsona

I suspect it's because we're not setting the encoding and it's picking up the default from the shell. @kedar-joshi what's the default locale and charset on your system?

Comment From: kedar-joshi

@kedar-joshi what's the default locale and charset on your system?

My locale is en_IN and charset is Latin-1 (ISO-8859-1).

Comment From: wilkinsona

Thanks. That sounds like the problem then. I've just pushed a change that should hopefully fix it.

Comment From: kedar-joshi

Yes, the fix worked perfectly. Thank you.