Files
git/Documentation
Karthik Nayak 929b1d08f7 Documentation: note styling for bit fields
Our codebase uses a lot of bit field variables, generally to mark
boolean type variables. While there is a formatting rule in the
'.clang-format', there is no guideline specified in the
'CodingGuidelines'.

Since the '.clang-format' is not yet enforced, let's also add a
guideline with the same rule as mentioned in the '.clang-format', which
is to not use any spaces around the colon, like so:

    unsigned my_field:1;
    unsigned other_field:1;
    unsigned field_with_longer_name:1;

This would allow us not to modify the clang-format file, and more
importantly, discourage people from doing ugly alignment with spaces,
i.e.

    unsigned my_field               : 1;
    unsigned            other_field : 1;
    unsigned field_with_longer_name : 1;

Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-08-26 15:46:03 -07:00
..
2025-08-07 08:48:57 -07:00
2025-03-01 10:26:15 -08:00
2025-02-14 17:53:47 -08:00
2025-02-18 15:30:31 -08:00
2025-02-14 17:53:47 -08:00
2025-06-17 10:44:38 -07:00
2025-08-04 08:10:33 -07:00
2025-02-14 17:53:47 -08:00
2025-07-21 09:14:27 -07:00