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
automatic indentation (and style) #225
Comments
Please, submit a pull request with a proposal. I did a quick check for The changes should add a target for the resulting makefiles to be able to do a |
The main issue is for me and others to understand your indentation style. I cannot guess it (and in my eyes, it might be inconsistent and not well defined). I don't understand what precise options to Once you have decided and agreed on some precise indentation, I suggest you to:
Once you defined an indentation style which can be automatized, implementing it in the If you want my personal opinion, I don't like your indentation in your C files, and I (Basile) prefer the GNU indentation style and to indent code with For C++ code, you probably want to define indentation as arguments to I believe that an indentation style can be arbitrary (it is a matter of taste) but should be documented and automatized (and if possible, not tied to one particular source code editor). BTW, I will commit a patch for issue#224, but I probably will indent the entire modified files with I tried to run My personal wish is to adopt GNU indentation and to use You can propose some other style, but you need to document it and provide some clues on how to automate it. The ability to automatize such formatting issues is more important than the particular style you choose to follow. |
Hi, I added the contributing file (suggestions appreciated!) to master. Also added As a sidenote the "old" blame and diff can be seen adding the |
Currently, I think that the file src/bindings/cpp/request.hpp looks particularly terrible. Mixed tabs and spaces, function names starting after the closing If you're looking for tools and options yet, probably the best tool to handle only whitespace for C/C++ would be ClangFormat, with rule options documented here. It basically works with a I can answer any questions, or work on a pull request if this is something the contributors or project owner is interested in. |
I like a lot to use some indentation tool (e.g. GNU indent or astyle or any other free software indentation tool).
It would be very nice to publish your indentation style, perhaps as some
.indent.pro
file containing configuration for GNU indent (or some other configuration for some other indenting tool).I don't care about what particular indentation style you use (honestly, I don't like it much -I prefer the usual GNU indentation style- and I don't exactly understand it, just am guessing it, but it is ok as long as you publish your style or give some indication on how to follow it, in particular how to reindent code for your tastes).
In an ideal world, I would be happy with some
indent
make target which would reindent automatically all the source code according to your tastes. This would facilitate external contributions.The text was updated successfully, but these errors were encountered: