Static Checks: Update Include Order Check Rules
The including statement group order in TF-M:
Public Headers
Private Headers
<> indicates public headers.
"" indicates private headers.
Logs of include order check are printed to console.
Change-Id: I265e58fe8f09bff9cbc54dd26341939db16693c1
Signed-off-by: Xinyu Zhang <xinyu.zhang@arm.com>
diff --git a/script/static-checks/static-checks-include-order.sh b/script/static-checks/static-checks-include-order.sh
index 0f2b46c..67089b5 100755
--- a/script/static-checks/static-checks-include-order.sh
+++ b/script/static-checks/static-checks-include-order.sh
@@ -1,6 +1,6 @@
#!/bin/bash
#
-# Copyright (c) 2019, Arm Limited. All rights reserved.
+# Copyright (c) 2019-2021, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -14,12 +14,12 @@
TEST_CASE="Order of includes on the last patch(es)"
"$CI_ROOT/script/static-checks/check-include-order.py" --tree "$1" \
--patch --from-ref origin/master \
- &> "$LOG_FILE"
+ | tee "$LOG_FILE"
else
echo "# Check order of includes of the entire source tree"
TEST_CASE="Order of includes of the entire source tree"
"$CI_ROOT/script/static-checks/check-include-order.py" --tree "$1" \
- &> "$LOG_FILE"
+ | tee "$LOG_FILE"
fi
EXIT_VALUE=$?