-
Notifications
You must be signed in to change notification settings - Fork 143
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
Fix C coding style #270
Comments
I think it's a great idea. I think we should try to format using LLVM or Google pre-defined styles first, just to understand how far we are from their code style, then to apply @secumod step-by-step :) |
In Here's a nice interactive tool to understand what each setting means |
Generally I'm fine with |
Awesome idea. It's important to investigate the volume of effort to achieve that to prioritize this along other goals we've got for next release. Asking @vixentael or @Lagovas to weigh in with well-investigated opinion on how long will it take to do this. |
never worked with this utility and doesn't know how they will work with current code formatting. it can be like one-time run and forget, or run and fix in many places bad readable formatting. if we have time then it will be good. if not, then it's good to start to use it incrementally on changed files in commit |
Actually the readability is OK. I just encountered that I needed to refactor includes in main Fixed it by moving For complete example, see this branch: https://github.com/secumod/themis/tree/clang-format/src/themis I reformatted files in |
vote for pointer on type instead variable name :) ( |
See |
🎉 Y—A—A—A—A—Y 🎉 Now the code style is updated and enforced for the core Soter and Themis libraries. Other C sources are still in disarray, but we'll sort that out. Eventually.
Four days. For what could have been a simple |
Many of Themis
.c
files have different code style (or no code style at all?). This creates confusion for potential contributors. Let's fix one coding style for all Themis/soter (not imported).c
files. My proposal is to use clang-format tool:.clang-format
and commit it to the repository.c
files with itThe text was updated successfully, but these errors were encountered: