Skip to content

Commit fc41ea9

Browse files
committed
Add Travis include mbed.h check
1 parent a09b5f5 commit fc41ea9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.travis.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,15 @@ matrix:
299299
- ! git grep -q --ignore-case "gnu general public";
300300
- ! git grep -q --ignore-case "gnu library general public";
301301

302+
- env:
303+
- NAME=include_check
304+
script:
305+
- echo 'Checking that there are no '#include "mbed.h"' in code where it should not be'
306+
- |
307+
! git grep '^#include\s["'"']mbed.h['"'"]$' -- '*.c' '*.h' '*.cpp' '*.hpp' \
308+
':!*platform_mbed.h' ':!*TESTS/*' ':!TEST_APPS/' ':!UNITTESTS/' \
309+
':!*tests/*' ':!*targets/*' ':!*TARGET_*' ':!*unsupported/*'
310+
302311
- env:
303312
- NAME=psa-autogen
304313
script:

0 commit comments

Comments
 (0)