We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is your feature request related to a problem? Please describe. Change formatting of C source files
Describe the solution you'd like I think for this project kernel C syntax would be much better. There are 3 things that could change:
Both for structs and for-if-while (anything other than functions) braces, they should start at the end of first statement. Instead of this:
typedef struct {
This one should be used:
typedef struct { ...
As for functions braces should start after statement. But for any other loop - statement - definition, it should look like this:
while { ... } for ;; { ... }
Last one is comments. All of the comments should be a multiline comment, and with a * on each of the following lines.
// Instead of comment /* Comment */ /* This * Is * Multiline comment */
I can handle this formatting if that is okay. https://www.kernel.org/doc/html/v4.10/process/coding-style.html
The text was updated successfully, but these errors were encountered:
We are using Clang Format. Not sure how well it is being used. But it runs with pre-commit
pre-commit
https://github.com/One-Language/One/blob/main/.clang-format
One/.pre-commit-config.yaml
Line 118 in 353abc6
Sorry, something went wrong.
refs #172
Suggested .clang-format 6c7cbe1
jbampton
BaseMax
amir-shiati
No branches or pull requests
Is your feature request related to a problem? Please describe.
Change formatting of C source files
Describe the solution you'd like
I think for this project kernel C syntax would be much better. There are 3 things that could change:
Both for structs and for-if-while (anything other than functions) braces, they should start at the end of first statement. Instead of this:
This one should be used:
As for functions braces should start after statement. But for any other loop - statement - definition, it should look like this:
Last one is comments. All of the comments should be a multiline comment, and with a * on each of the following lines.
I can handle this formatting if that is okay.
https://www.kernel.org/doc/html/v4.10/process/coding-style.html
The text was updated successfully, but these errors were encountered: