docs: add Code_style.md#518
Conversation
Co-authored-by: jperon <cataclop@hotmail.com>
| ## Line breaks, new lines and file Endings | ||
|
|
||
| All source files must end with one empty line. Files should not contain multiple consecutive empty lines. |
There was a problem hiding this comment.
what do you think about this? I'm thinking on dropping this requirement.. I notice Claude Code, at least, has some trouble on sticking to this rule.. I'm not sure the benefit of having this rule pays off...
@carloslack would be good to have your input on this, as well.. ;-)
There was a problem hiding this comment.
Have you tried putting these rules through Claude Code first? It might help us see which ones it consistently struggles with, and then we can decide whether to drop or relax them...
There was a problem hiding this comment.
Many times.. it seems to forget about this all the time
There was a problem hiding this comment.
I think we can relax this a bit. git expects a for new line att EOF for proper maintenance, so my suggestion:
All source files must end with a single newline. Avoid using more than one consecutive empty line within source files.
That way it’s simple, and not too strict. WDYT?
| @@ -0,0 +1,235 @@ | |||
| # Lunatik C Code Style Guide | |||
|
|
|||
| This guide outlines the code style conventions observed in the `lunatik.h` header file, which should be followed for consistency across the Lunatik project. As a general rule, we tend to stick to [Linux kernel rules](https://www.kernel.org/doc/html/latest/process/coding-style.html). | |||
There was a problem hiding this comment.
wondering if it wouldn't be easier to just base our style on something existent, like this one, and just ask Claude to document the differences..
| ```c | ||
| if (condition) { | ||
| /* ... */ | ||
| } |
There was a problem hiding this comment.
another thing that I notice Claude has some difficult is on..
if (...) {
...
}
else
it always get back to this..
if (...) {
...
} else
thinking o dropping this requirement as well..
There was a problem hiding this comment.
i assume, dropping this requirement means, sticking to linux kernel style...
Adds Code_style.md to formalize project-wide C coding standards