From b68628aae6838bee03e4c1568d51e7afad8cdf26 Mon Sep 17 00:00:00 2001 From: Aleksi Klasila Date: Tue, 8 Jan 2019 10:58:22 +0200 Subject: [PATCH] Add Travis include mbed.h check --- .travis.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.travis.yml b/.travis.yml index 9cef638f75..923db6ebcd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -306,6 +306,15 @@ matrix: - ! git grep -q --ignore-case "gnu general public"; - ! git grep -q --ignore-case "gnu library general public"; + - env: + - NAME=include_check + script: + - echo 'Checking that there are no '#include "mbed.h"' in code where it should not be' + - | + ! git grep '^#include\s["'"']mbed.h['"'"]$' -- '*.c' '*.h' '*.cpp' '*.hpp' \ + ':!*platform_mbed.h' ':!*TESTS/*' ':!TEST_APPS/' ':!UNITTESTS/' \ + ':!*tests/*' ':!*targets/*' ':!*TARGET_*' ':!*unsupported/*' + - env: - NAME=psa-autogen script: