Remove `-Wno-error=array-bounds` from several build configurations (#28835)
* Remove -Wno-error=array-bounds from nlfaultinjection library
* Remove some array-bounds from esp32 as well: nlfaultinjection should be fixed separately
* Remove nlfaultinjection as a submodule, add only relevant files with patch for gcc12 support.
* Restyle
* Update a few more include paths for nlfaultinjection
* exclude nlfaultinjection from clangtidy
* Restyle
* Apply clang-tidy fixes to nlfaultinjection.cpp
diff --git a/scripts/examples/tests/expected_test_cmakelists.txt b/scripts/examples/tests/expected_test_cmakelists.txt
index 78e2059..e8e2d3f 100644
--- a/scripts/examples/tests/expected_test_cmakelists.txt
+++ b/scripts/examples/tests/expected_test_cmakelists.txt
@@ -70,7 +70,7 @@
"//TEST_ROOT_PATH/config/standalone/"
"//TEST_ROOT_PATH/third_party/nlassert/repo/include/"
"//TEST_ROOT_PATH/third_party/nlio/repo/include/"
- "//TEST_ROOT_PATH/third_party/nlfaultinjection/repo/include/"
+ "//TEST_ROOT_PATH/third_party/nlfaultinjection/include/"
"//TEST_ROOT_PATH/third_party/nlunit-test/repo/src/")
set_target_properties("${target}" PROPERTIES COMPILE_DEFINITIONS "CHIP_HAVE_CONFIG_H=1;")
set_target_properties("${target}" PROPERTIES COMPILE_FLAGS "-O0 -std=gnu++14 -fno-rtti ")
diff --git a/scripts/examples/tests/test_project.json b/scripts/examples/tests/test_project.json
index dbaf96a..d15f2ab 100644
--- a/scripts/examples/tests/test_project.json
+++ b/scripts/examples/tests/test_project.json
@@ -88,7 +88,7 @@
"//config/standalone/",
"//third_party/nlassert/repo/include/",
"//third_party/nlio/repo/include/",
- "//third_party/nlfaultinjection/repo/include/",
+ "//third_party/nlfaultinjection/include/",
"//third_party/nlunit-test/repo/src/"
],
"ldflags": ["-march=armv8-a", "-O0"],