1
1
/*
2
- * Copyright 2020-2021 DiffPlug
2
+ * Copyright 2020-2022 DiffPlug
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -69,19 +69,19 @@ public FormatterStep create() {
69
69
70
70
private State createState () throws IOException , InterruptedException {
71
71
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 );
85
85
return new State (this , exe );
86
86
}
87
87
@@ -106,7 +106,7 @@ String format(ProcessRunner runner, String input, File file) throws IOException,
106
106
final List <String > tmpArgs = new ArrayList <>();
107
107
tmpArgs .add (exe .confirmVersionAndGetAbsolutePath ());
108
108
if (style != null ) {
109
- tmpArgs .add ("--style=" + style );
109
+ tmpArgs .add ("--style=" + style );
110
110
}
111
111
args = tmpArgs ;
112
112
}
0 commit comments