diff --git a/examples/chip-tool/templates/commands.zapt b/examples/chip-tool/templates/commands.zapt index 04dee59ed86162..45d56d355dbb24 100644 --- a/examples/chip-tool/templates/commands.zapt +++ b/examples/chip-tool/templates/commands.zapt @@ -5,10 +5,10 @@ #include #include -#include -#include #include #include +#include +#include static void OnDefaultSuccessResponse(void * context) { diff --git a/examples/platform/nrfconnect/util/DFUTrigger.cpp b/examples/platform/nrfconnect/util/DFUTrigger.cpp index 674e48476110c3..b1c14bc792409c 100644 --- a/examples/platform/nrfconnect/util/DFUTrigger.cpp +++ b/examples/platform/nrfconnect/util/DFUTrigger.cpp @@ -21,7 +21,7 @@ #endif #include -#include +#include namespace { constexpr const char * kGPIOController = "GPIO_0"; diff --git a/src/app/zap-templates/templates/app/CHIPClusters-src.zapt b/src/app/zap-templates/templates/app/CHIPClusters-src.zapt index aa376dd56c2b98..2cdab62e764bbf 100644 --- a/src/app/zap-templates/templates/app/CHIPClusters-src.zapt +++ b/src/app/zap-templates/templates/app/CHIPClusters-src.zapt @@ -5,19 +5,17 @@ #include + +#include +#include +#include +#include #include +#include #include #include #include - -#include -#include -#include - #include -#include -#include -#include #define COMMAND_HEADER(name, clusterId) \ const char * kName = name; \ diff --git a/src/app/zap-templates/templates/app/af-structs.zapt b/src/app/zap-templates/templates/app/af-structs.zapt index 332a6afcdf4cfb..48a552e91b2561 100644 --- a/src/app/zap-templates/templates/app/af-structs.zapt +++ b/src/app/zap-templates/templates/app/af-structs.zapt @@ -4,8 +4,10 @@ #pragma once #include + #include #include + #include "enums.h" {{#zcl_structs}} diff --git a/src/controller/java/templates/CHIPClusters-JNI.zapt b/src/controller/java/templates/CHIPClusters-JNI.zapt index 73344e60e88d43..e2be23a7b01af7 100644 --- a/src/controller/java/templates/CHIPClusters-JNI.zapt +++ b/src/controller/java/templates/CHIPClusters-JNI.zapt @@ -8,10 +8,10 @@ #include #include #include -#include -#include #include +#include #include +#include #define JNI_METHOD(RETURN, CLASS_NAME, METHOD_NAME) \ extern "C" JNIEXPORT RETURN JNICALL Java_chip_devicecontroller_ChipClusters_00024##CLASS_NAME##_##METHOD_NAME diff --git a/src/controller/python/chip/clusters/CHIPClusters.cpp b/src/controller/python/chip/clusters/CHIPClusters.cpp index bda1f2b15fcbf2..49c92376101e76 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.cpp +++ b/src/controller/python/chip/clusters/CHIPClusters.cpp @@ -17,10 +17,9 @@ // THIS FILE IS GENERATED BY ZAP -#include - #include #include +#include #include #include diff --git a/src/controller/python/templates/python-CHIPClusters-cpp.zapt b/src/controller/python/templates/python-CHIPClusters-cpp.zapt index 62f20d6388672e..c631e89cc9d0b3 100644 --- a/src/controller/python/templates/python-CHIPClusters-cpp.zapt +++ b/src/controller/python/templates/python-CHIPClusters-cpp.zapt @@ -1,9 +1,8 @@ {{> header}} -#include - #include #include +#include #include #include diff --git a/src/credentials/CHIPCert.h b/src/credentials/CHIPCert.h index e13c8cc91ce398..c04dbdd39e6dc5 100644 --- a/src/credentials/CHIPCert.h +++ b/src/credentials/CHIPCert.h @@ -27,6 +27,7 @@ #pragma once +#include #include #include diff --git a/src/credentials/tests/CHIPCert_test_vectors.h b/src/credentials/tests/CHIPCert_test_vectors.h index 13296d40b8352d..ae25c363daab69 100644 --- a/src/credentials/tests/CHIPCert_test_vectors.h +++ b/src/credentials/tests/CHIPCert_test_vectors.h @@ -26,7 +26,6 @@ #pragma once -#include #include #include #include diff --git a/src/darwin/Framework/CHIP/CHIPManualSetupPayloadParser.mm b/src/darwin/Framework/CHIP/CHIPManualSetupPayloadParser.mm index e0566292119eaf..4841a8a7592911 100644 --- a/src/darwin/Framework/CHIP/CHIPManualSetupPayloadParser.mm +++ b/src/darwin/Framework/CHIP/CHIPManualSetupPayloadParser.mm @@ -20,9 +20,9 @@ #import "CHIPLogging.h" #import "CHIPSetupPayload_Internal.h" +#import #import #import -#import @implementation CHIPManualSetupPayloadParser { NSString * _decimalStringRepresentation; diff --git a/src/darwin/Framework/CHIP/CHIPQRCodeSetupPayloadParser.mm b/src/darwin/Framework/CHIP/CHIPQRCodeSetupPayloadParser.mm index 9d1c0eb4da81e0..f28b3032f5e66f 100644 --- a/src/darwin/Framework/CHIP/CHIPQRCodeSetupPayloadParser.mm +++ b/src/darwin/Framework/CHIP/CHIPQRCodeSetupPayloadParser.mm @@ -20,9 +20,9 @@ #import "CHIPLogging.h" #import "CHIPSetupPayload_Internal.h" +#import #import #import -#import @implementation CHIPQRCodeSetupPayloadParser { NSString * _base38Representation; diff --git a/src/lib/BUILD.gn b/src/lib/BUILD.gn index baf56f56a5149f..f978466be7be29 100644 --- a/src/lib/BUILD.gn +++ b/src/lib/BUILD.gn @@ -15,10 +15,6 @@ import("//build_overrides/chip.gni") import("lib.gni") -config("includes") { - include_dirs = [ "." ] -} - static_library("lib") { public_deps = [ "${chip_root}/src/app", diff --git a/src/lib/asn1/ASN1.h b/src/lib/asn1/ASN1.h index ee5b2045e91ab2..4481107a8773a8 100644 --- a/src/lib/asn1/ASN1.h +++ b/src/lib/asn1/ASN1.h @@ -48,7 +48,7 @@ namespace chip { namespace ASN1 { #ifndef DOXYGEN_SHOULD_SKIP_THIS -#include +#include #endif static constexpr size_t kMaxConstructedAndEncapsulatedTypesDepth = 10; diff --git a/src/lib/asn1/BUILD.gn b/src/lib/asn1/BUILD.gn index 2245d5e3843b96..4ce6755ef43d77 100644 --- a/src/lib/asn1/BUILD.gn +++ b/src/lib/asn1/BUILD.gn @@ -51,7 +51,6 @@ static_library("asn1") { public_configs = [ "${chip_root}/src:includes", - "${chip_root}/src/lib:includes", "${chip_root}/src/system:system_config", ] } diff --git a/src/lib/asn1/tests/TestASN1.cpp b/src/lib/asn1/tests/TestASN1.cpp index ca5f2da8fc3295..c0ac5ce954393e 100644 --- a/src/lib/asn1/tests/TestASN1.cpp +++ b/src/lib/asn1/tests/TestASN1.cpp @@ -30,11 +30,9 @@ #include #include -#include - #include #include -#include +#include using namespace chip; using namespace chip::ASN1; diff --git a/src/lib/core/BUILD.gn b/src/lib/core/BUILD.gn index 212dff6ccb1c0c..79c5a2e2b3884e 100644 --- a/src/lib/core/BUILD.gn +++ b/src/lib/core/BUILD.gn @@ -69,10 +69,7 @@ source_set("chip_config_header") { "CHIPTimeConfig.h", ] - public_configs = [ - "${chip_root}/src:includes", - "${chip_root}/src/lib:includes", - ] + public_configs = [ "${chip_root}/src:includes" ] public_deps = [ ":chip_buildconfig", diff --git a/src/lib/core/CHIPConfig.h b/src/lib/core/CHIPConfig.h index db42cb6a77c2a7..22ef9296da7010 100644 --- a/src/lib/core/CHIPConfig.h +++ b/src/lib/core/CHIPConfig.h @@ -36,7 +36,7 @@ #pragma once #if CHIP_HAVE_CONFIG_H -#include +#include #endif #include diff --git a/src/lib/mdns/Discovery_ImplPlatform.cpp b/src/lib/mdns/Discovery_ImplPlatform.cpp index edd3a52ad925c7..23c7a5e00f4eef 100644 --- a/src/lib/mdns/Discovery_ImplPlatform.cpp +++ b/src/lib/mdns/Discovery_ImplPlatform.cpp @@ -15,23 +15,23 @@ * limitations under the License. */ -#include "Discovery_ImplPlatform.h" -#include "MdnsCache.h" +#include #include -#include "ServiceNaming.h" -#include "lib/core/CHIPSafeCasts.h" -#include "lib/mdns/TxtFields.h" -#include "lib/mdns/platform/Mdns.h" -#include "lib/support/logging/CHIPLogging.h" -#include "platform/CHIPDeviceConfig.h" -#include "platform/CHIPDeviceLayer.h" #include +#include +#include +#include +#include +#include #include #include #include #include +#include +#include +#include namespace chip { namespace Mdns { diff --git a/src/lib/mdns/Resolver_ImplMinimalMdns.cpp b/src/lib/mdns/Resolver_ImplMinimalMdns.cpp index c72b48673da12b..d73fb1cabb0fdf 100644 --- a/src/lib/mdns/Resolver_ImplMinimalMdns.cpp +++ b/src/lib/mdns/Resolver_ImplMinimalMdns.cpp @@ -20,11 +20,9 @@ #include -#include "MinimalMdnsServer.h" -#include "ServiceNaming.h" - #include - +#include +#include #include #include #include diff --git a/src/lib/mdns/platform/Mdns.h b/src/lib/mdns/platform/Mdns.h index 499686cb603eca..93b4a0b501f82a 100644 --- a/src/lib/mdns/platform/Mdns.h +++ b/src/lib/mdns/platform/Mdns.h @@ -28,11 +28,11 @@ #include #include -#include "inet/IPAddress.h" -#include "inet/InetInterface.h" -#include "lib/core/Optional.h" -#include "lib/mdns/ServiceNaming.h" +#include +#include #include +#include +#include namespace chip { namespace Mdns { diff --git a/src/lib/mdns/tests/TestMdnsCache.cpp b/src/lib/mdns/tests/TestMdnsCache.cpp index 9df617d5b6982c..9f9380186b33f4 100644 --- a/src/lib/mdns/tests/TestMdnsCache.cpp +++ b/src/lib/mdns/tests/TestMdnsCache.cpp @@ -15,14 +15,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include + // set this to 1 to enable DumpCache to see the state of the cache when needed // #define MDNS_LOGGING 1 -#include -#include - #include -#include +#include #include #include @@ -30,6 +27,9 @@ #include #include #include +#include +#include +#include #include #include diff --git a/src/lib/shell/MainLoopZephyr.cpp b/src/lib/shell/MainLoopZephyr.cpp index 20c98789430ce5..fc7dc9809be373 100644 --- a/src/lib/shell/MainLoopZephyr.cpp +++ b/src/lib/shell/MainLoopZephyr.cpp @@ -15,7 +15,7 @@ * limitations under the License. */ #include -#include +#include #include #include diff --git a/src/lib/shell/streamer_zephyr.cpp b/src/lib/shell/streamer_zephyr.cpp index dbed745296c816..40a16d56fbbd94 100644 --- a/src/lib/shell/streamer_zephyr.cpp +++ b/src/lib/shell/streamer_zephyr.cpp @@ -24,8 +24,8 @@ #include -#include -#include +#include +#include namespace chip { namespace Shell { diff --git a/src/lib/support/BUILD.gn b/src/lib/support/BUILD.gn index ecaba701cf03a8..919dc4358af932 100644 --- a/src/lib/support/BUILD.gn +++ b/src/lib/support/BUILD.gn @@ -144,7 +144,6 @@ static_library("support") { public_configs = [ "${chip_root}/src:includes", - "${chip_root}/src/lib:includes", "${chip_root}/src/system:system_config", ] diff --git a/src/platform/logging/impl/android/Logging.cpp b/src/platform/logging/impl/android/Logging.cpp index a11970ad95da47..fcfc397ea1bbaa 100644 --- a/src/platform/logging/impl/android/Logging.cpp +++ b/src/platform/logging/impl/android/Logging.cpp @@ -1,7 +1,7 @@ /* See Project chip LICENSE file for licensing information. */ -#include "platform/logging/LogV.h" #include +#include #include diff --git a/src/tools/chip-cert/chip-cert.h b/src/tools/chip-cert/chip-cert.h index b9fc5df5bc4776..77c2042f3ed6d3 100644 --- a/src/tools/chip-cert/chip-cert.h +++ b/src/tools/chip-cert/chip-cert.h @@ -52,7 +52,6 @@ #include #include #include -#include #include #include #include diff --git a/zzz_generated/app-common/app-common/zap-generated/af-structs.h b/zzz_generated/app-common/app-common/zap-generated/af-structs.h index e042de43e21f66..b512375318d4ad 100644 --- a/zzz_generated/app-common/app-common/zap-generated/af-structs.h +++ b/zzz_generated/app-common/app-common/zap-generated/af-structs.h @@ -20,10 +20,12 @@ // Prevent multiple inclusion #pragma once -#include "enums.h" +#include + #include #include -#include + +#include "enums.h" // Struct for ApplicationLauncherApp typedef struct _ApplicationLauncherApp diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp index cae3831c5b1123..c305dd1925b096 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp @@ -21,18 +21,15 @@ #include -#include -#include -#include -#include - #include +#include #include #include - -#include +#include #include #include +#include +#include #include #define COMMAND_HEADER(name, clusterId) \ diff --git a/zzz_generated/lighting-app/zap-generated/CHIPClusters.cpp b/zzz_generated/lighting-app/zap-generated/CHIPClusters.cpp index 7103a55d601f1e..541efcc26190ca 100644 --- a/zzz_generated/lighting-app/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/lighting-app/zap-generated/CHIPClusters.cpp @@ -21,18 +21,15 @@ #include -#include -#include -#include -#include - #include +#include #include #include - -#include +#include #include #include +#include +#include #include #define COMMAND_HEADER(name, clusterId) \ diff --git a/zzz_generated/pump-app/zap-generated/CHIPClusters.cpp b/zzz_generated/pump-app/zap-generated/CHIPClusters.cpp index 0bc3845b5bab37..a5cbbc3f366b40 100644 --- a/zzz_generated/pump-app/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/pump-app/zap-generated/CHIPClusters.cpp @@ -21,18 +21,15 @@ #include -#include -#include -#include -#include - #include +#include #include #include - -#include +#include #include #include +#include +#include #include #define COMMAND_HEADER(name, clusterId) \ diff --git a/zzz_generated/pump-controller-app/zap-generated/CHIPClusters.cpp b/zzz_generated/pump-controller-app/zap-generated/CHIPClusters.cpp index 945004a25cd6e5..ae4250cbaaefc6 100644 --- a/zzz_generated/pump-controller-app/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/pump-controller-app/zap-generated/CHIPClusters.cpp @@ -21,18 +21,15 @@ #include -#include -#include -#include -#include - #include +#include #include #include - -#include +#include #include #include +#include +#include #include #define COMMAND_HEADER(name, clusterId) \ diff --git a/zzz_generated/tv-app/zap-generated/CHIPClusters.cpp b/zzz_generated/tv-app/zap-generated/CHIPClusters.cpp index 5ee8519239fa10..65f4ac699807ca 100644 --- a/zzz_generated/tv-app/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/tv-app/zap-generated/CHIPClusters.cpp @@ -21,18 +21,15 @@ #include -#include -#include -#include -#include - #include +#include #include #include - -#include +#include #include #include +#include +#include #include #define COMMAND_HEADER(name, clusterId) \