You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a Jenkins pipeline which builds my application then runs various tools. Doxygen, CppCheck, Lizard Code complexity and a few others. In my code many functions are declared as static, this meads my unit tests (ceedling) cannot see them, or test them.
To make them visible for ceedling I have to declare each function as follows
#ifdef CEEDLING_TESTS
uint16_t ring_buffer_advance(uint16_t current_index, uint16_t buffer_size){
#else
static uint16_t ring_buffer_advance(uint16_t current_index, uint16_t buffer_size){
#endif
if (buffer_size > 0) {
current_index++;
if (current_index >= buffer_size) {
current_index = 0;
}
} else {
printf("error - ring buffer max value can not be zero \n");
current_index = 0;
}
return current_index;
}
Now in the c and h files I use ifdefs to create the appropriate function prototype. Lizard does not find these functions and does not generate a complexity report.
The text was updated successfully, but these errors were encountered:
I have a Jenkins pipeline which builds my application then runs various tools. Doxygen, CppCheck, Lizard Code complexity and a few others. In my code many functions are declared as static, this meads my unit tests (ceedling) cannot see them, or test them.
To make them visible for ceedling I have to declare each function as follows
Now in the c and h files I use ifdefs to create the appropriate function prototype. Lizard does not find these functions and does not generate a complexity report.
The text was updated successfully, but these errors were encountered: