apache / celix

Apache Celix is a framework for C and C++14 to develop dynamic modular software applications using component and in-process service-oriented programming.
https://celix.apache.org/
Apache License 2.0
167 stars 88 forks source link

Feature/coding conventions #544

Closed pnoltes closed 1 year ago

pnoltes commented 1 year ago

This PR introduces an Apache Celix Coding Convention document along with a .clang-format file.

These additions aim to streamline Celix development by promoting more readable and maintainable code.

Please consider this PR as a proposal and feel free to contribute suggestions for changes. However, if this PR is merged, compliance with the coding conventions and format style is encouraged during pull request reviews.

For this particular PR, I would appreciate receiving some more reviews to ensure that the proposed changes are widely accepted by the community.

codecov-commenter commented 1 year ago

Codecov Report

Merging #544 (3a0661c) into master (f9ada53) will decrease coverage by 0.01%. The diff coverage is n/a.

:exclamation: Current head 3a0661c differs from pull request most recent head 546490e. Consider uploading reports for the commit 546490e to get more accurate results

@@            Coverage Diff             @@
##           master     #544      +/-   ##
==========================================
- Coverage   78.03%   78.02%   -0.01%     
==========================================
  Files         229      229              
  Lines       35016    35016              
==========================================
- Hits        27324    27322       -2     
- Misses       7692     7694       +2     
Impacted Files Coverage Δ
...xx_remote_services/admin/src/RemoteServiceAdmin.cc 78.70% <ø> (ø)
libs/framework/include/celix/Bundle.h 100.00% <ø> (ø)
libs/framework/include/celix/ServiceRegistration.h 96.63% <ø> (ø)
libs/framework/include/celix/Trackers.h 92.00% <ø> (ø)
libs/framework/include/celix/dm/Component.h 94.44% <ø> (ø)
libs/pushstreams/api/celix/PushEvent.h 75.00% <ø> (ø)
libs/pushstreams/api/celix/PushStream.h 95.12% <ø> (ø)
libs/utils/include/celix/Filter.h 100.00% <ø> (ø)

... and 1 file with indirect coverage changes

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

rlenferink commented 1 year ago

/cc @WopsS maybe you will find this an interesting PR as well ;)

WopsS commented 1 year ago

Good job for writing all of these!

Since some things can be overseen in reviews I suggest to setup a workflow to check the formatting of new C++ code. If this is a good idea I can submit a PR for it.

pnoltes commented 1 year ago

Good job

Thanks. Yes I think that is a good idea, ideally this only applies for adjusted code and new source files but I would be interested in workflow that can help us with ensuring consistent formatting.

PengZheng commented 1 year ago

If no further comments, I suggest give the clang-format file a try. @xuzhenbao

pnoltes commented 1 year ago

While I would prefer additional reviewers, this pull request has remained open for an extended period, so I'm going to merge it now. If there are any suggestions for updating the coding conventions, these can be implemented in a separate pull request.