eclipse-iceoryx / eclipse-iceoryx/iceoryx
Define naming rules for iceoryx and check them with `clang-tidy`
- Dominant language
- C++
- Stars
- 2.2k
- Forks
- 492
- Avg merge
- 18h 57m
- Merged PRs (30d)
- 1
Description
## Brief feature description
Currently iceoryx has somehow inconsistent naming rules and naming conventions which are not verified by `clang-tidy`.
### rules which deviate from the iceoryx naming guidelines
In `iceoryx_binding_c`
* snake_case is used for function names
* every function has an `iox_` prefix and an additional prefix which names the corresponding c++ class and is named after the method it calls
* lowerCamelCase for variable names
* enums have an `iox_` prefix
* enum values have the enums name without the `iox_` has prefix, but not consistently, see `log.h`
In `iceoryx_hoofs/cxx`
* classes, methods and functions follow a mixture of snake_case and UpperCamelCase and lowerCamelCase
## Detailed information
The following approaches are possible:
* define the naming rules in separate `.clang-tidy` files which inherit from the main `.clang-tidy` file and are stored in the folders with the deviation.
* Unify the naming rules. Here we can distinct between languages and have a unified naming rule for C++ and exclude binding c from it.
A unified naming rule would make as more incompatible (but not less understandable) from the STL and would introduce a lot of API breaking changes. Multiple naming rules may look inconsistent and are maybe harder to maintain.
Contributor guide
Research direction
Start by reviewing the existing .clang-tidy configuration and the naming patterns in iceoryx_binding_c and iceoryx_hoofs/cxx, including the enum cases in log.h. Clarify whether separate configurations or unified rules are wanted, then define the selected conventions and verify that clang-tidy checks the relevant code without unintended API changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100