-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Description
The project currently does not use consistent formatting throughout the codebase. This makes it sometimes confusing to know which pattern to follow. However, more importantly, in the context of the xv6 course/labs, this makes it harder to track changes and impossible to use an auto-formatter.
In many places there is trailing whitespace like spaces. Even without an explicit formatter, most IDEs will trim those. When checking ones changes before submitting this makes it hard to see which changes one implemented manually and in which places there were only whitespace changes. (I know that whitespace changes can often be suppressed but not everyone might know that, and it might not always be desired.) And using an auto-formatter is impossible because it will reformat most of the codebase making it impossible to track changes.
I propose to add a .clang-format file to the repository root and reformat the codebase accordingly. Additionally, CI should be set up such that a PR should only be accepted if it follows the code style to ensure future conformance.