Add include-what-you-use test for public headers#73
Add include-what-you-use test for public headers#73urbasus wants to merge 1 commit intogeorgerobotics:mainfrom
Conversation
| #ifndef CYW43_INCLUDED_CYW43_INTERNAL_H | ||
| #define CYW43_INCLUDED_CYW43_INTERNAL_H | ||
|
|
||
| #include "cyw43_ll.h" |
There was a problem hiding this comment.
This (cyw43_internal.h) is not a public header, so I don't think it needs anything added to it.
|
|
||
| #include <stdint.h> | ||
| #include <stdbool.h> | ||
| #include <stddef.h> |
There was a problem hiding this comment.
Can we sort these alphabetically by file name?
| #ifndef CYW43_INCLUDED_CYW43_SPI_H | ||
| #define CYW43_INCLUDED_CYW43_SPI_H | ||
|
|
||
| #include "cyw43_internal.h" |
There was a problem hiding this comment.
That seems strange that a public header needs to include an internal header... need to think about this some more.
There was a problem hiding this comment.
That seems strange that a public header needs to include an internal header... need to think about this some more.
Agreed. The supposedly internal cyw43_int_t in the supposedly public API makes for a visibilty mismatch.
I'll handle the other remarks in the meantime.
| $(CC) $(CFLAGS) -Wno-pedantic -c $< -o $@ | ||
|
|
||
| # Add to phony test target trigger | ||
| test: $(PUBLIC_HEADER_GCH) |
There was a problem hiding this comment.
Can we move this header test (pre-compiled headers) to a completely separate test? Eg tests/headers/?
For each public header a test is added to see whether it can be compiled into a pre-compiled header. Success indicates the header includes all the necessary headers.
Headers missing includes have been fixed.
Testing added to phony "test" target.
Dependency generation included.