hazelcast / hazelcast/hazelcast-cpp-client

Add clang-format configuration

Open
#722 0 comments 0 reactions 0 assignees View on GitHub
Type: Enhancement
Dominant language
C++
Stars
91
Forks
54
Avg merge
1d 12m
Merged PRs (30d)
5

Description

The library lacks a guide about how the code should be formatted.
There are inconsistencies and some lines contain too many characters to fit on a screen.

A [clang-format](https://clang.llvm.org/docs/ClangFormat.html) configuration with a column limit is crucial for both consistency and readability.

It could be discussed that whether the formatting should be enforced by continuous integration. A problem with enforcing the formatting is the variance in the layout between different clang-format versions (see: http://lists.llvm.org/pipermail/cfe-dev/2017-June/054351.html). For example, if I format the codebase with clang-format version 11 and then verify it with version 10 on the CI server it emits errors. So, if we were to strictly enforce the formatting, we would have to install the same clang-format version everywhere.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.