-
Notifications
You must be signed in to change notification settings - Fork 238
Closed
Description
What is the current behaviour and why should it be changed?
The current code selectively disables clang-format and deliberately un-indents code which is only kept for compatibility reasons.
The idea is obviously that this should make the code stand out.
This has downsides:
- readability
- specific instances confuse clang-format despite the disabling (see clang-format issues settings.cpp #2587)
Describe possible approaches
It would be good to find an alternative approach here which keeps the regular indentation.
One possible idea from https://github.com/jamulussoftware/jamulus/pull/2587/files#r845895199 is using #defines.
global.h:
#define COMPAT_JAMULUS_BEFORE_3_6_1somecode.cpp:
#ifdef COMPAT_JAMULUS_BEFORE_3_6_1
if (someConditionToCheckOnlyForOldJamulusVersions)
{
#endif
someRegularCodeForAllVersions();
#ifdef COMPAT_JAMULUS_BEFORE_3_6_1
}
#endifAnother approach is a style using regular TODO comments (see below discussion for examples).
Has this feature been discussed and generally agreed?
No, needs agreement.
ann0see
Metadata
Metadata
Assignees
Labels
No labels