-
Notifications
You must be signed in to change notification settings - Fork 42
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
C code style format and checks #20
Conversation
This commit updates the travis pipeline to check violations of the c code standard. It also adds a script to apply the style to any .c or .h file in the project.
&travel_time, | ||
&qos, | ||
&hop_count); | ||
r = sd_bus_message_read( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case, could you remove clang formatting?
All those parameters are more readable with one on each line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It actually makes no sense shy the format is being applied like this :(
{ | ||
int r; | ||
/* Release the GIL. It will be acquire by the callback | ||
* It make this thread totally independant from python code | ||
*/ | ||
Py_BEGIN_ALLOW_THREADS | ||
for (;;) | ||
Py_BEGIN_ALLOW_THREADS for (;;) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is it put on same line?
sink_service/source/data.c
Outdated
travel_time, | ||
qos, | ||
hop_count); | ||
r = sd_bus_message_append( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, it would be better to keep one on each line
sink_service/source/main.c
Outdated
@@ -84,7 +82,8 @@ int main(int argc, char *argv[]) | |||
break; | |||
case 'i': | |||
/* Get the sink id to generate service name */ | |||
sink_id = strtoul(optarg, NULL, 0);; | |||
sink_id = strtoul(optarg, NULL, 0); | |||
; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be removed ;-)
sink_service/source/otap.c
Outdated
SD_BUS_PROPERTY("ProcessedLen", "u", NULL, offsetof(sink_otap_t, processed_len), 0), | ||
SD_BUS_PROPERTY("ProcessedCrc", "q", NULL, offsetof(sink_otap_t, processed_crc), 0), | ||
SD_BUS_PROPERTY("ProcessedSeq", "y", NULL, offsetof(sink_otap_t, processed_seq), 0), | ||
SD_BUS_PROPERTY("StoredLen", "u", NULL, offsetof(sink_otap_t, stored_len), 0), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer the old allignement here
This commit updates the travis pipeline to
check violations of the c code standard.
It also adds a script to apply the style to
any .c or .h file in the project.