Open pford opened 10 months ago
I've had a look at the docs and I'm pretty sure this is because of SpacesInLineCommentPrefix
, introduced in clang-format
13.
Personally I think that this is a good rule, and in the short term we should adjust the code to add the spaces. We don't consistently use this comment format anyway -- it only appears in a few files, and in some cases there is already a space.
It looks like on Ubuntu Jammy (22.04) the default clang-format
version is 14, so now is probably a good time to fix this.
In the long term, as we add documentation to the code, this specific type of comment (a description of the file) should be converted to the doxygen-compatible format (as in TileCache.h
).
On macOS,
brew install clang-format
installs version 17.0.6. When you run the style.py script to check formatting with this version, there is a "Bad format" error in every header file where it expects a space between // and #:The workaround is to install the next older version with homebrew; currently,
brew install clang-format@11