mirror of
https://xff.cz/git/u-boot/
synced 2025-08-31 16:22:36 +02:00
checkpatch: Don't allow common.h and dm.h in headers
These headers should not be included in other header files. Add a checkpatch rule and test for this. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -398,6 +398,13 @@ index 0000000..2234c87
|
||||
pm.add_line('common/main.c', '#undef CONFIG_CMD_WHICH')
|
||||
self.checkSingleMessage(pm, 'DEFINE_CONFIG_CMD', 'error')
|
||||
|
||||
def testBarredIncludeInHdr(self):
|
||||
"""Test for using a barred include in a header file"""
|
||||
pm = PatchMaker()
|
||||
#pm.add_line('include/myfile.h', '#include <common.h>')
|
||||
pm.add_line('include/myfile.h', '#include <dm.h>')
|
||||
self.checkSingleMessage(pm, 'BARRED_INCLUDE_IN_HDR', 'error')
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
Reference in New Issue
Block a user