diff --git a/.github/config.yml b/.github/config.yml index 2fd28336c224ad..027b4dc4e4deca 100644 --- a/.github/config.yml +++ b/.github/config.yml @@ -5,3 +5,4 @@ todo: autoAssign: true # string|string[]|boolean label: ["todo"] # boolean|string|string[] reopenClosed: true # boolean + exclude: ".*lint\\.yaml|.*/(zzz_generated|zap-generated)/.*" # string diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 71b5fd52fd963d..76a5338e768a99 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -41,3 +41,8 @@ jobs: - name: Check for incorrect error use in VerifyOrExit run: | git grep -n "VerifyOrExit(.*, [A-Za-z]*_ERROR" -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0 + + # Comments like '{{! ... }}' should be used in zap files + - name: Do not allow TODO in generated files + run: | + git grep -n 'TODO:' -- ./zzz_generated './*/zap-generated/*' && exit 1 || exit 0 diff --git a/src/app/zap-templates/templates/app/CHIPClientCallbacks-src.zapt b/src/app/zap-templates/templates/app/CHIPClientCallbacks-src.zapt index 95028e5dd7e2fe..8f03d6b1b0bf71 100644 --- a/src/app/zap-templates/templates/app/CHIPClientCallbacks-src.zapt +++ b/src/app/zap-templates/templates/app/CHIPClientCallbacks-src.zapt @@ -118,9 +118,9 @@ namespace { } -// TODO: These IM related callbacks contains small or no generated code, should be put into seperate file to reduce the size of template. -// Singleton instance of the callbacks manager +{{! TODO: These IM related callbacks contains small or no generated code, should be put into seperate file to reduce the size of template. }} +// Singleton instance of the callbacks manager app::CHIPDeviceCallbacksMgr & gCallbacks = app::CHIPDeviceCallbacksMgr::GetInstance(); {{#chip_client_clusters}} diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp index bb42802e80992b..b6b2f791011367 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp @@ -131,9 +131,7 @@ namespace { return true; \ } -// TODO: These IM related callbacks contains small or no generated code, should be put into seperate file to reduce the size of -// template. Singleton instance of the callbacks manager - +// Singleton instance of the callbacks manager app::CHIPDeviceCallbacksMgr & gCallbacks = app::CHIPDeviceCallbacksMgr::GetInstance(); void ApplicationLauncherClusterApplicationLauncherListListAttributeFilter(TLV::TLVReader * tlvData, diff --git a/zzz_generated/lighting-app/zap-generated/CHIPClientCallbacks.cpp b/zzz_generated/lighting-app/zap-generated/CHIPClientCallbacks.cpp index ca2e48fa13e4d1..e28673418b09cd 100644 --- a/zzz_generated/lighting-app/zap-generated/CHIPClientCallbacks.cpp +++ b/zzz_generated/lighting-app/zap-generated/CHIPClientCallbacks.cpp @@ -131,7 +131,5 @@ namespace { return true; \ } -// TODO: These IM related callbacks contains small or no generated code, should be put into seperate file to reduce the size of -// template. Singleton instance of the callbacks manager - +// Singleton instance of the callbacks manager app::CHIPDeviceCallbacksMgr & gCallbacks = app::CHIPDeviceCallbacksMgr::GetInstance(); diff --git a/zzz_generated/ota-requestor-app/zap-generated/CHIPClientCallbacks.cpp b/zzz_generated/ota-requestor-app/zap-generated/CHIPClientCallbacks.cpp index fc2adfa21d544d..37e8013efc1d31 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/CHIPClientCallbacks.cpp +++ b/zzz_generated/ota-requestor-app/zap-generated/CHIPClientCallbacks.cpp @@ -131,9 +131,7 @@ namespace { return true; \ } -// TODO: These IM related callbacks contains small or no generated code, should be put into seperate file to reduce the size of -// template. Singleton instance of the callbacks manager - +// Singleton instance of the callbacks manager app::CHIPDeviceCallbacksMgr & gCallbacks = app::CHIPDeviceCallbacksMgr::GetInstance(); bool emberAfOtaSoftwareUpdateProviderClusterApplyUpdateRequestResponseCallback(EndpointId endpoint, app::CommandSender * commandObj, diff --git a/zzz_generated/pump-app/zap-generated/CHIPClientCallbacks.cpp b/zzz_generated/pump-app/zap-generated/CHIPClientCallbacks.cpp index ca2e48fa13e4d1..e28673418b09cd 100644 --- a/zzz_generated/pump-app/zap-generated/CHIPClientCallbacks.cpp +++ b/zzz_generated/pump-app/zap-generated/CHIPClientCallbacks.cpp @@ -131,7 +131,5 @@ namespace { return true; \ } -// TODO: These IM related callbacks contains small or no generated code, should be put into seperate file to reduce the size of -// template. Singleton instance of the callbacks manager - +// Singleton instance of the callbacks manager app::CHIPDeviceCallbacksMgr & gCallbacks = app::CHIPDeviceCallbacksMgr::GetInstance(); diff --git a/zzz_generated/pump-controller-app/zap-generated/CHIPClientCallbacks.cpp b/zzz_generated/pump-controller-app/zap-generated/CHIPClientCallbacks.cpp index ca2e48fa13e4d1..e28673418b09cd 100644 --- a/zzz_generated/pump-controller-app/zap-generated/CHIPClientCallbacks.cpp +++ b/zzz_generated/pump-controller-app/zap-generated/CHIPClientCallbacks.cpp @@ -131,7 +131,5 @@ namespace { return true; \ } -// TODO: These IM related callbacks contains small or no generated code, should be put into seperate file to reduce the size of -// template. Singleton instance of the callbacks manager - +// Singleton instance of the callbacks manager app::CHIPDeviceCallbacksMgr & gCallbacks = app::CHIPDeviceCallbacksMgr::GetInstance(); diff --git a/zzz_generated/thermostat/zap-generated/CHIPClientCallbacks.cpp b/zzz_generated/thermostat/zap-generated/CHIPClientCallbacks.cpp index 664a42917aa1c8..b913d71dee199a 100644 --- a/zzz_generated/thermostat/zap-generated/CHIPClientCallbacks.cpp +++ b/zzz_generated/thermostat/zap-generated/CHIPClientCallbacks.cpp @@ -131,9 +131,7 @@ namespace { return true; \ } -// TODO: These IM related callbacks contains small or no generated code, should be put into seperate file to reduce the size of -// template. Singleton instance of the callbacks manager - +// Singleton instance of the callbacks manager app::CHIPDeviceCallbacksMgr & gCallbacks = app::CHIPDeviceCallbacksMgr::GetInstance(); bool emberAfIdentifyClusterIdentifyQueryResponseCallback(EndpointId endpoint, app::CommandSender * commandObj, uint16_t timeout) diff --git a/zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.cpp b/zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.cpp index df004060de32d3..66204a50b03fbc 100644 --- a/zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.cpp +++ b/zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.cpp @@ -131,9 +131,7 @@ namespace { return true; \ } -// TODO: These IM related callbacks contains small or no generated code, should be put into seperate file to reduce the size of -// template. Singleton instance of the callbacks manager - +// Singleton instance of the callbacks manager app::CHIPDeviceCallbacksMgr & gCallbacks = app::CHIPDeviceCallbacksMgr::GetInstance(); void GeneralCommissioningClusterBasicCommissioningInfoListListAttributeFilter(TLV::TLVReader * tlvData,