Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide .clang-format or update astyle #185

Open
daniel-j-h opened this issue Dec 20, 2016 · 2 comments
Open

Provide .clang-format or update astyle #185

daniel-j-h opened this issue Dec 20, 2016 · 2 comments

Comments

@daniel-j-h
Copy link
Contributor

It seems like this project is not using a .clang-format style file for formatting. Using make indent (which calls astyle with some options) wants to re-format basically the whole source tree for me.

@joto what's your take on this? Also what do you think about documenting this in the dev docs?

@joto
Copy link
Member

joto commented Dec 20, 2016

Years ago I used astyle, but haven't used it in a long time. So it is a sort-of left-over from before as you can see by the fact that it is defined in the Makefile and not in the CMake config. Astyle seems to be unmaintained and doesn't work well with modern C++, so that is a dead end there. I wanted to switch to clang-format, but getting it to do what I want isn't that easy if at all possible. Only rather new versions are usable at all. So for the time being I am stuck with manual formatting. Now that more and more other people are contributing code, this should probably be "fixed".

TODO items:

  • Find suitable clang-format definition
  • Remove astyle stuff.

@joto
Copy link
Member

joto commented Jan 13, 2017

Astyle stuff has been removed in 76e153d.

I experimented with clang-format-3.8 but aren't very happy. It is rather buggy and doesn't support common formatting choices like indented nested preprocessor directives.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants