11/*
2- * Copyright 2020-2021 DiffPlug
2+ * Copyright 2020-2022 DiffPlug
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
@@ -69,19 +69,19 @@ public FormatterStep create() {
6969
7070 private State createState () throws IOException , InterruptedException {
7171 String howToInstall = "" +
72- "You can download clang-format from https://releases.llvm.org and " +
73- "then point Spotless to it with {@code pathToExe('/path/to/clang-format')} " +
74- "or you can use your platform's package manager:" +
75- "\n win: choco install llvm --version {version} (try dropping version if it fails)" +
76- "\n mac: brew install clang-format (TODO: how to specify version?)" +
77- "\n linux: apt install clang-format (try clang-format-{version} with dropped minor versions)" +
78- "\n github issue to handle this better: https://github.com/diffplug/spotless/issues/673" ;
79- final ForeignExe exe = ForeignExe .nameAndVersion ("clang-format" , version )
80- .pathToExe (pathToExe )
81- .fixCantFind (howToInstall )
82- .fixWrongVersion (
83- "You can tell Spotless to use the version you already have with {@code clangFormat('{versionFound}')}" +
84- "or you can download the currently specified version, {version}.\n " + howToInstall );
72+ "You can download clang-format from https://releases.llvm.org and " +
73+ "then point Spotless to it with {@code pathToExe('/path/to/clang-format')} " +
74+ "or you can use your platform's package manager:" +
75+ "\n win: choco install llvm --version {version} (try dropping version if it fails)" +
76+ "\n mac: brew install clang-format (TODO: how to specify version?)" +
77+ "\n linux: apt install clang-format (try clang-format-{version} with dropped minor versions)" +
78+ "\n github issue to handle this better: https://github.com/diffplug/spotless/issues/673" ;
79+ final ForeignExe exe = ForeignExe .nameAndVersion ("clang-format" , version )
80+ .pathToExe (pathToExe )
81+ .fixCantFind (howToInstall )
82+ .fixWrongVersion (
83+ "You can tell Spotless to use the version you already have with {@code clangFormat('{versionFound}')}" +
84+ "or you can download the currently specified version, {version}.\n " + howToInstall );
8585 return new State (this , exe );
8686 }
8787
@@ -106,7 +106,7 @@ String format(ProcessRunner runner, String input, File file) throws IOException,
106106 final List <String > tmpArgs = new ArrayList <>();
107107 tmpArgs .add (exe .confirmVersionAndGetAbsolutePath ());
108108 if (style != null ) {
109- tmpArgs .add ("--style=" + style );
109+ tmpArgs .add ("--style=" + style );
110110 }
111111 args = tmpArgs ;
112112 }
0 commit comments