update clang-format to version 18
Closes issue #522
I updated clang-format to version 18, mostly because I don't have version 11 available locally and that was annoying.
4000 lines changes may seem like a lot, but I thought it would be a lot worse.
I don't have a good explanation for why the CI is failing. clang-format-18 does not result in any changes on my laptop. Will need some further investigation.
It's great. Thanks. I see that there is still one issue somewhere. But we had the same issue this Summer and we were using the CI to tell us whether formatting was good or not, as opposed to be using clangformat on our machine. Thanks!
I was ultimately able to just build llvm from source so that I could still use clang-format-11 on my laptop. No longer a big issue for me, though it would still be nice to update at some point.
OK. Cool. I will try this trick on my laptop too. Thanks. That was a pain. I had not thought about changing the clangformat version on my laptop. Good idea.
That being said, well, yes, it would be nicer to update on the CI side! But not a priority!
One note is that while I was able to change the clang-format version on my laptop, this version is too old to integrate with vscode, so it always needs to be run manually.
Hey! Sorry for the delay to comment. Great that you have some time to contribute new stuff!
I've been thinking... I don't like the CI telling us that we need to format our code. It makes more difficult to people to contribute. Instead, I think we should have an auto-formatting task that will go over the code before every merge request. I think this is doable, and git seems to provide those kind of tasks. What do you think?
I don't have time to work on that now, but maybe you let this PR open so we remember something needs to be done.
That actually sounds like a great idea. Would remove at least some of the burden from the developers.
Although I have sometimes noticed that the automatic fixes are not great. Especially for the indentation in the documentation. But I guess to avoid that, the developer can still install clang-format locally, even a different version should still be roughly fine.