Skip to content
New issue

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

Style #135

Open
DimitriPapadopoulos opened this issue Aug 28, 2021 · 1 comment
Open

Style #135

DimitriPapadopoulos opened this issue Aug 28, 2021 · 1 comment

Comments

@DimitriPapadopoulos
Copy link
Contributor

DimitriPapadopoulos commented Aug 28, 2021

I have a hard time reading the code.

The code itself is complex, which is OK to obtain a small footprint. It would help understand the code if the style was consistent. Right now, I see for example a mixture of:

if (...)
{
   do_something();
if (...)
{  do_something();

These days, I would recommend trying to follow the Linux kernel coding style. Not that I like it more than others, but it does result in compact and very readable code, and it is widely used. Other widely followed coding styles include the GTK coding style and GNU coding standards.

Current style is OK too (3 space for indents for example) but it needs to be consistent and consistently applied.

@LB--
Copy link
Member

LB-- commented Sep 3, 2021

I agree that there should be some more consistency, though I'd prefer to enact more consistency in the least invasive way so that the line attribution is still useful in most cases. Whitespace-only changes are fine because git has an option to ignore them when obtaining line attribution, but I'm not sure how it handles e.g. moving from the second snippet to the first snippet in your example, I'll have to check that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants