Project

General

Profile

Actions

Cleanup #39161

closed

Propper formatting of sourcecode (tabs/spaces mixup)

Added by Daniel Poelzleithner about 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:

Description

The sourcecode has mixed up with tab/space. The formatting is partially very bad and makes reading code a pain.
If/else logic without {} combined with mixed spaces and callbacks is a hell to read.

Use a proper formatting standard and support for formatting with tools like clang-format.
Add editor config file for easy adoption.

Actions #1

Updated by Nathan Cutler about 5 years ago

Please note that wholesale whitespace, indentation, and other code-formatting changes are frowned upon here because they make backporting difficult (the formatting changes interfere with cherry-picks).

Actions #2

Updated by Nathan Cutler about 5 years ago

  • Project changed from bluestore to Ceph
Actions #3

Updated by Brad Hubbard about 5 years ago

More importantly wholesale whitespace/formatting changes obscure git history. We have a style guide here which we try to enforce on new submissions but we will not going back and modifying the existing code unless it is done as part of work that touches that code anyway.

https://github.com/ceph/ceph/blob/master/CodingStyle

Actions #4

Updated by Greg Farnum about 5 years ago

  • Status changed from New to Closed

This is gradually improving but indeed is not going to get a wholesale fix. If somebody wants to write git commit hooks that comply with our CodingStyle that would be welcome though!

Actions

Also available in: Atom PDF