Skip to content

Commit 8d4f771

Browse files
committed
Add SpacesInAngles key to ClangFormat configuration
The previous ClangFormat configuration was developed for use with ClangFormat 11.0.1. The version of ClangFormat now in use by Arduino tools is 14.0.0. This configuration key was added in the interim. The key value set here was chosen in order to: - Align with behavior of the Arduino IDE 1.x "Auto Format" feature. This was not possible to achieve using the configuration capabilities of ClangFormat 11.0.1, so the diff in the "golden master" test data is actually a reversion of unwanted formatting changes unavoidably produced by the previous version.
1 parent e90c79d commit 8d4f771

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

other/clang-format-configuration/.clang-format

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ SpaceBeforeSquareBrackets: false
163163
SpaceInEmptyBlock: false
164164
SpaceInEmptyParentheses: false
165165
SpacesBeforeTrailingComments: 2
166-
SpacesInAngles: false
166+
SpacesInAngles: Leave
167167
SpacesInCStyleCastParentheses: false
168168
SpacesInConditionalStatement: false
169169
SpacesInContainerLiterals: false
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
template<int foo> void bar() {}
22

33
void baz() {
4-
bar<42>();
4+
bar< 42 >();
55
bar<42>();
66
}
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include <set>
22
#include <vector>
33

4-
std::vector<std::set<int>> foo;
4+
std::vector<std::set<int> > foo;
55

66
std::vector<std::set<int>> bar;

0 commit comments

Comments
 (0)