forked from personal/squiggle.c
add clang-tidy to check for possible errors.
This commit is contained in:
parent
0c22716635
commit
827fa3823b
BIN
examples/00_example_template/example
Executable file
BIN
examples/00_example_template/example
Executable file
Binary file not shown.
2
makefile
2
makefile
|
@ -17,3 +17,5 @@ format: squiggle.c squiggle.h
|
||||||
$(FORMATTER) squiggle.c
|
$(FORMATTER) squiggle.c
|
||||||
$(FORMATTER) squiggle.h
|
$(FORMATTER) squiggle.h
|
||||||
|
|
||||||
|
lint:
|
||||||
|
clang-tidy squiggle.c -- -lm
|
||||||
|
|
|
@ -217,7 +217,7 @@ struct box process_error(const char* error_msg, int should_exit, char* file, int
|
||||||
exit(1);
|
exit(1);
|
||||||
} else {
|
} else {
|
||||||
char error_msg[MAX_ERROR_LENGTH];
|
char error_msg[MAX_ERROR_LENGTH];
|
||||||
snprintf(error_msg, MAX_ERROR_LENGTH, "@, in %s (%d)", file, line);
|
snprintf(error_msg, MAX_ERROR_LENGTH, "@, in %s (%d)", file, line); // NOLINT: We are being carefull here by considering MAX_ERROR_LENGTH explicitly.
|
||||||
struct box error = { .empty = 1, .error_msg = error_msg };
|
struct box error = { .empty = 1, .error_msg = error_msg };
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user