From 20ab45acaabe5da4dec69f568efcda1970d6fa6d Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 14 Sep 2022 11:09:32 -0400 Subject: [PATCH 01/10] Add lint step for IDLs in workflows, ensure lint can be run with act --- .github/workflows/lint.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 274432a5d7ee18..c3590a50593698 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -29,6 +29,7 @@ jobs: steps: - uses: Wandalen/wretry.action@v1.0.15 + if: ${{ !env.ACT }} name: Checkout with: action: actions/checkout@v3 @@ -36,6 +37,32 @@ jobs: token: ${{ github.token }} attempt_limit: 3 attempt_delay: 2000 + # To use act like: + # act -j full_android + # + # Note you likely still need to have non submodules setup for the + # local machine, like: + # git submodule deinit --all + - uses: actions/checkout@v3 + if: ${{ env.ACT }} + name: Checkout (ACT for local build) + + - name: Check for matter lint errors + if: always() + run: | + for idl_file in $(find . -name '*.matter'); do + # TODO: all these conformance failures should be fixed + if [ "$idl_file" == './examples/window-app/common/window-app.matter' ]; then continue; fi + if [ "$idl_file" == './examples/log-source-app/log-source-common/log-source-app.matter']; then continue; fi + if [ "$idl_file" == './examples/placeholder/linux/apps/app1/config.matter']; then continue; fi + if [ "$idl_file" == './examples/placeholder/linux/apps/app2/config.matter']; then continue; fi + if [ "$idl_file" == './examples/thermostat/thermostat-common/thermostat.matter']; then continue; fi + if [ "$idl_file" == './examples/all-clusters-app/all-clusters-common/all-clusters-app.matter']; then continue; fi + if [ "$idl_file" == './examples/lighting-app/lighting-common/lighting-app.matter']; then continue; fi + if [ "$idl_file" == './examples/log-source-app/log-source-common/log-source-app.matter']; then continue; fi + + ./scripts/run_in_build_env.sh "./scripts/idl_lint.py --log-level warn $idl_file" >/dev/null || exit 1 + done - name: Check broken links # On-push disabled until the job can run fully green From ee6c0a865cb7ae1e02016521ac60f3ef6604e3bb Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 14 Sep 2022 11:10:15 -0400 Subject: [PATCH 02/10] Remove default value for an external array in chef zap files --- .../chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap | 4 ++-- examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap | 4 ++-- examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap | 4 ++-- examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap | 4 ++-- .../chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap | 2 +- examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap | 4 ++-- .../chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap | 4 ++-- examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap | 4 ++-- examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap | 4 ++-- examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap | 4 ++-- examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap | 4 ++-- .../chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap | 4 ++-- examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap | 4 ++-- examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap | 4 ++-- examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap | 4 ++-- .../chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap | 4 ++-- examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap | 4 ++-- examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap | 4 ++-- 18 files changed, 35 insertions(+), 35 deletions(-) diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap index 8c9bd42ba0e185..185bacbdd1aac0 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap @@ -1768,7 +1768,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "en-US", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -7293,4 +7293,4 @@ "deviceIdentifier": 257 } ] -} \ No newline at end of file +} diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap index e07a4963e4c79a..7b6d2bdbf5d5c8 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap @@ -1768,7 +1768,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "en-US", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -6121,4 +6121,4 @@ "deviceIdentifier": 21 } ] -} \ No newline at end of file +} diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap index d7e1e7608f111b..39ff848fdf45d2 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap @@ -1768,7 +1768,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "en-US", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -7293,4 +7293,4 @@ "deviceIdentifier": 257 } ] -} \ No newline at end of file +} diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap index 8861aea78c47e6..c7789e5d9438d6 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap @@ -1768,7 +1768,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "en-US", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -8993,4 +8993,4 @@ "deviceIdentifier": 10 } ] -} \ No newline at end of file +} diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap index 33b44dcc44c151..87f2a50e42fc37 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap @@ -1768,7 +1768,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "en-US", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap index a238d364463730..502a1c667feab3 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap @@ -1768,7 +1768,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "en-US", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -6169,4 +6169,4 @@ "deviceIdentifier": 774 } ] -} \ No newline at end of file +} diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap index 1191a739b16779..1494a9ce71deed 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap @@ -1768,7 +1768,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "en-US", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -7989,4 +7989,4 @@ "deviceIdentifier": 768 } ] -} \ No newline at end of file +} diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap index dbc1ee37645e4e..98472e2d9cb697 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap @@ -1768,7 +1768,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "en-US", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -6169,4 +6169,4 @@ "deviceIdentifier": 775 } ] -} \ No newline at end of file +} diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap index b251a7eee34f54..7fe32e2ae8bb8c 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap @@ -1768,7 +1768,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "en-US", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -6185,4 +6185,4 @@ "deviceIdentifier": 262 } ] -} \ No newline at end of file +} diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap index 6360904f1c115b..c6ddc2f2c131ee 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap @@ -1768,7 +1768,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "en-US", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -6297,4 +6297,4 @@ "deviceIdentifier": 263 } ] -} \ No newline at end of file +} diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap index eb7381cdf03fbe..cd0d66d87befd8 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap @@ -1768,7 +1768,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "en-US", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -7293,4 +7293,4 @@ "deviceIdentifier": 256 } ] -} \ No newline at end of file +} diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap index 406a18eb75d20c..2d4f3adcb6c8eb 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap @@ -1768,7 +1768,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "en-US", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -7293,4 +7293,4 @@ "deviceIdentifier": 259 } ] -} \ No newline at end of file +} diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap index e7d197c4967398..bc90e3592e7538 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap @@ -1768,7 +1768,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "en-US", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -6969,4 +6969,4 @@ "deviceIdentifier": 266 } ] -} \ No newline at end of file +} diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap index 1cd284c2d6e3e6..a4f13d0c66fa22 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap @@ -1768,7 +1768,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "en-US", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -6249,4 +6249,4 @@ "deviceIdentifier": 773 } ] -} \ No newline at end of file +} diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap index 96d12593a15851..7bd026e763ad97 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap @@ -1768,7 +1768,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "en-US", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -6401,4 +6401,4 @@ "deviceIdentifier": 34 } ] -} \ No newline at end of file +} diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap index 55a4408b9b5ac4..036c5e40488d2a 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap @@ -1768,7 +1768,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "en-US", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -6169,4 +6169,4 @@ "deviceIdentifier": 770 } ] -} \ No newline at end of file +} diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap index c5d7778151f82e..0965092c514189 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap @@ -1768,7 +1768,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "en-US", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -7649,4 +7649,4 @@ "deviceIdentifier": 769 } ] -} \ No newline at end of file +} diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap index ab5b67fe0f8a1b..bf0101a9bf0081 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap @@ -1768,7 +1768,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "en-US", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -6851,4 +6851,4 @@ "deviceIdentifier": 514 } ] -} \ No newline at end of file +} From c5e9c28b5e3aa7ec8568eb6df30b7bbaa4582501 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 14 Sep 2022 12:27:29 -0400 Subject: [PATCH 03/10] Ran zap regen for chef stuff --- .../chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter | 2 +- examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter | 2 +- examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter | 2 +- examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter | 2 +- .../chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter | 2 +- examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter | 2 +- .../chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter | 2 +- examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter | 2 +- examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter | 2 +- .../chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter | 2 +- examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter | 2 +- .../chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter | 2 +- .../chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter | 2 +- examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter | 2 +- examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter | 2 +- .../chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter | 2 +- examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter | 2 +- examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter index 117743cd24985f..dea778ed115a67 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter @@ -1462,7 +1462,7 @@ endpoint 0 { } server cluster LocalizationConfiguration { - callback attribute supportedLocales default = en-US; + callback attribute supportedLocales; ram attribute featureMap; ram attribute clusterRevision default = 1; } diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter index 8f7ac32195c3a3..f7bd8def98d11f 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter @@ -1344,7 +1344,7 @@ endpoint 0 { } server cluster LocalizationConfiguration { - callback attribute supportedLocales default = en-US; + callback attribute supportedLocales; ram attribute featureMap; ram attribute clusterRevision default = 1; } diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter index 2ce3904406d698..e946a696265796 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter @@ -1596,7 +1596,7 @@ endpoint 0 { } server cluster LocalizationConfiguration { - callback attribute supportedLocales default = en-US; + callback attribute supportedLocales; ram attribute featureMap; ram attribute clusterRevision default = 1; } diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter index 0d2115f46386d1..9ced0a67bebc74 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter @@ -1951,7 +1951,7 @@ endpoint 0 { } server cluster LocalizationConfiguration { - callback attribute supportedLocales default = en-US; + callback attribute supportedLocales; ram attribute featureMap; ram attribute clusterRevision default = 1; } diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter index e5af42f7ef99fd..4ef124fc73ceb7 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter @@ -1851,7 +1851,7 @@ endpoint 0 { } server cluster LocalizationConfiguration { - callback attribute supportedLocales default = en-US; + callback attribute supportedLocales; ram attribute featureMap; ram attribute clusterRevision default = 1; } diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter index 159fe2757c4119..ab6331ba6a9d07 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter @@ -1356,7 +1356,7 @@ endpoint 0 { } server cluster LocalizationConfiguration { - callback attribute supportedLocales default = en-US; + callback attribute supportedLocales; ram attribute featureMap; ram attribute clusterRevision default = 1; } diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter index be1738b949c927..78f939eea12171 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter @@ -1704,7 +1704,7 @@ endpoint 0 { } server cluster LocalizationConfiguration { - callback attribute supportedLocales default = en-US; + callback attribute supportedLocales; ram attribute featureMap; ram attribute clusterRevision default = 1; } diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter index 00e67a2bd4deb0..4e88f17793aeaf 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter @@ -1356,7 +1356,7 @@ endpoint 0 { } server cluster LocalizationConfiguration { - callback attribute supportedLocales default = en-US; + callback attribute supportedLocales; ram attribute featureMap; ram attribute clusterRevision default = 1; } diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter index 3a42f2fdf5dbcd..4931c5b9fddf08 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter @@ -1360,7 +1360,7 @@ endpoint 0 { } server cluster LocalizationConfiguration { - callback attribute supportedLocales default = en-US; + callback attribute supportedLocales; ram attribute featureMap; ram attribute clusterRevision default = 1; } diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter index 580869007caac6..25f9e418a6cf5a 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter @@ -1355,7 +1355,7 @@ endpoint 0 { } server cluster LocalizationConfiguration { - callback attribute supportedLocales default = en-US; + callback attribute supportedLocales; ram attribute featureMap; ram attribute clusterRevision default = 1; } diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter index 94083d0042ffaf..71b06ddabf3129 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter @@ -1586,7 +1586,7 @@ endpoint 0 { } server cluster LocalizationConfiguration { - callback attribute supportedLocales default = en-US; + callback attribute supportedLocales; ram attribute featureMap; ram attribute clusterRevision default = 1; } diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter index e0f722dbd5dcb9..5416d07045d040 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter @@ -1645,7 +1645,7 @@ endpoint 0 { } server cluster LocalizationConfiguration { - callback attribute supportedLocales default = en-US; + callback attribute supportedLocales; ram attribute featureMap; ram attribute clusterRevision default = 1; } diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter index cec1e6232a171a..15279b11bfc620 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter @@ -1492,7 +1492,7 @@ endpoint 0 { } server cluster LocalizationConfiguration { - callback attribute supportedLocales default = en-US; + callback attribute supportedLocales; ram attribute featureMap; ram attribute clusterRevision default = 1; } diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter index 382e478beef027..d3c03ff88a0264 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter @@ -1359,7 +1359,7 @@ endpoint 0 { } server cluster LocalizationConfiguration { - callback attribute supportedLocales default = en-US; + callback attribute supportedLocales; ram attribute featureMap; ram attribute clusterRevision default = 1; } diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter index 9592f025a07727..e348a6fcf6e95d 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter @@ -1466,7 +1466,7 @@ endpoint 0 { } server cluster LocalizationConfiguration { - callback attribute supportedLocales default = en-US; + callback attribute supportedLocales; ram attribute featureMap; ram attribute clusterRevision default = 1; } diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter index 9b83d3baeaa7d8..23d52b9b801728 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter @@ -1355,7 +1355,7 @@ endpoint 0 { } server cluster LocalizationConfiguration { - callback attribute supportedLocales default = en-US; + callback attribute supportedLocales; ram attribute featureMap; ram attribute clusterRevision default = 1; } diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter index 68f07c72c48c2a..bd66c9090115d5 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter @@ -1604,7 +1604,7 @@ endpoint 0 { } server cluster LocalizationConfiguration { - callback attribute supportedLocales default = en-US; + callback attribute supportedLocales; ram attribute featureMap; ram attribute clusterRevision default = 1; } diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter index 9966ada69b6003..08709cf19a553c 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter @@ -1584,7 +1584,7 @@ endpoint 0 { } server cluster LocalizationConfiguration { - callback attribute supportedLocales default = en-US; + callback attribute supportedLocales; ram attribute featureMap; ram attribute clusterRevision default = 1; } From 269b1003e1360c44c73d32efe9ac746dcc613c1f Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 14 Sep 2022 12:28:04 -0400 Subject: [PATCH 04/10] Bootstrap and checkout so that idl script can run, added issues on todo --- .github/workflows/lint.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c3590a50593698..fd6152281c2212 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -47,11 +47,25 @@ jobs: if: ${{ env.ACT }} name: Checkout (ACT for local build) + # Bootstrap and checkout for internal scripts (like idl_lint) + # to run + - name: Checkout submodules + run: scripts/checkout_submodules.py --shallow --platform linux + - name: Bootstrap + timeout-minutes: 10 + run: scripts/build/gn_bootstrap.sh + - name: Check for matter lint errors if: always() run: | for idl_file in $(find . -name '*.matter'); do # TODO: all these conformance failures should be fixed + # Issues exist for most of them: + # https://github.com/project-chip/connectedhomeip/issues/19180 + # https://github.com/project-chip/connectedhomeip/issues/19176 + # https://github.com/project-chip/connectedhomeip/issues/19175 + # https://github.com/project-chip/connectedhomeip/issues/19173 + # https://github.com/project-chip/connectedhomeip/issues/19169 if [ "$idl_file" == './examples/window-app/common/window-app.matter' ]; then continue; fi if [ "$idl_file" == './examples/log-source-app/log-source-common/log-source-app.matter']; then continue; fi if [ "$idl_file" == './examples/placeholder/linux/apps/app1/config.matter']; then continue; fi From 7083fc9a5b4bd168eec18a4aceb1d9f4a7573a26 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 14 Sep 2022 13:08:05 -0400 Subject: [PATCH 05/10] Set container for lints: we need some packages installed for checkout submodules and bootstrap to work --- .github/workflows/lint.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index fd6152281c2212..e77a90c30a377d 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -27,6 +27,9 @@ jobs: runs-on: ubuntu-latest if: github.actor != 'restyled-io[bot]' + container: + image: connectedhomeip/chip-build:0.5.99 + steps: - uses: Wandalen/wretry.action@v1.0.15 if: ${{ !env.ACT }} From 5eef07601a97c0a96b821c1ad9b560feec9667a2 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 14 Sep 2022 13:08:51 -0400 Subject: [PATCH 06/10] Fix comment on how to act-execute the lints --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index e77a90c30a377d..8fc1d261432221 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -41,7 +41,7 @@ jobs: attempt_limit: 3 attempt_delay: 2000 # To use act like: - # act -j full_android + # act -j code-lints # # Note you likely still need to have non submodules setup for the # local machine, like: From 69f4eb14c44bcd666918700bf0c882617de29829 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 14 Sep 2022 14:15:30 -0400 Subject: [PATCH 07/10] Add space before ] for propper scripting --- .github/workflows/lint.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 8fc1d261432221..0a5a4def4c09cb 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -70,13 +70,13 @@ jobs: # https://github.com/project-chip/connectedhomeip/issues/19173 # https://github.com/project-chip/connectedhomeip/issues/19169 if [ "$idl_file" == './examples/window-app/common/window-app.matter' ]; then continue; fi - if [ "$idl_file" == './examples/log-source-app/log-source-common/log-source-app.matter']; then continue; fi - if [ "$idl_file" == './examples/placeholder/linux/apps/app1/config.matter']; then continue; fi - if [ "$idl_file" == './examples/placeholder/linux/apps/app2/config.matter']; then continue; fi - if [ "$idl_file" == './examples/thermostat/thermostat-common/thermostat.matter']; then continue; fi - if [ "$idl_file" == './examples/all-clusters-app/all-clusters-common/all-clusters-app.matter']; then continue; fi - if [ "$idl_file" == './examples/lighting-app/lighting-common/lighting-app.matter']; then continue; fi - if [ "$idl_file" == './examples/log-source-app/log-source-common/log-source-app.matter']; then continue; fi + if [ "$idl_file" == './examples/log-source-app/log-source-common/log-source-app.matter' ]; then continue; fi + if [ "$idl_file" == './examples/placeholder/linux/apps/app1/config.matter' ]; then continue; fi + if [ "$idl_file" == './examples/placeholder/linux/apps/app2/config.matter' ]; then continue; fi + if [ "$idl_file" == './examples/thermostat/thermostat-common/thermostat.matter' ]; then continue; fi + if [ "$idl_file" == './examples/all-clusters-app/all-clusters-common/all-clusters-app.matter' ]; then continue; fi + if [ "$idl_file" == './examples/lighting-app/lighting-common/lighting-app.matter' ]; then continue; fi + if [ "$idl_file" == './examples/log-source-app/log-source-common/log-source-app.matter' ]; then continue; fi ./scripts/run_in_build_env.sh "./scripts/idl_lint.py --log-level warn $idl_file" >/dev/null || exit 1 done From 76149643f45df2505fe47cacb45fb4c0d8f73347 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 14 Sep 2022 16:19:52 -0400 Subject: [PATCH 08/10] Replace == with = in script --- .github/workflows/lint.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 0a5a4def4c09cb..4aa6754bf200a2 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -69,14 +69,14 @@ jobs: # https://github.com/project-chip/connectedhomeip/issues/19175 # https://github.com/project-chip/connectedhomeip/issues/19173 # https://github.com/project-chip/connectedhomeip/issues/19169 - if [ "$idl_file" == './examples/window-app/common/window-app.matter' ]; then continue; fi - if [ "$idl_file" == './examples/log-source-app/log-source-common/log-source-app.matter' ]; then continue; fi - if [ "$idl_file" == './examples/placeholder/linux/apps/app1/config.matter' ]; then continue; fi - if [ "$idl_file" == './examples/placeholder/linux/apps/app2/config.matter' ]; then continue; fi - if [ "$idl_file" == './examples/thermostat/thermostat-common/thermostat.matter' ]; then continue; fi - if [ "$idl_file" == './examples/all-clusters-app/all-clusters-common/all-clusters-app.matter' ]; then continue; fi - if [ "$idl_file" == './examples/lighting-app/lighting-common/lighting-app.matter' ]; then continue; fi - if [ "$idl_file" == './examples/log-source-app/log-source-common/log-source-app.matter' ]; then continue; fi + if [ "$idl_file" = './examples/window-app/common/window-app.matter' ]; then continue; fi + if [ "$idl_file" = './examples/log-source-app/log-source-common/log-source-app.matter' ]; then continue; fi + if [ "$idl_file" = './examples/placeholder/linux/apps/app1/config.matter' ]; then continue; fi + if [ "$idl_file" = './examples/placeholder/linux/apps/app2/config.matter' ]; then continue; fi + if [ "$idl_file" = './examples/thermostat/thermostat-common/thermostat.matter' ]; then continue; fi + if [ "$idl_file" = './examples/all-clusters-app/all-clusters-common/all-clusters-app.matter' ]; then continue; fi + if [ "$idl_file" = './examples/lighting-app/lighting-common/lighting-app.matter' ]; then continue; fi + if [ "$idl_file" = './examples/log-source-app/log-source-common/log-source-app.matter' ]; then continue; fi ./scripts/run_in_build_env.sh "./scripts/idl_lint.py --log-level warn $idl_file" >/dev/null || exit 1 done From d63fec60a55b2cf60d98c4b07e607a6234d4a96a Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 14 Sep 2022 17:24:26 -0400 Subject: [PATCH 09/10] Add more exceptions for the idl linter. virtually all chef files are broken --- .github/workflows/lint.yml | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 4aa6754bf200a2..2ffc3ffa19498b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -69,14 +69,33 @@ jobs: # https://github.com/project-chip/connectedhomeip/issues/19175 # https://github.com/project-chip/connectedhomeip/issues/19173 # https://github.com/project-chip/connectedhomeip/issues/19169 - if [ "$idl_file" = './examples/window-app/common/window-app.matter' ]; then continue; fi + # https://github.com/project-chip/connectedhomeip/issues/22640 + if [ "$idl_file" = './examples/all-clusters-app/all-clusters-common/all-clusters-app.matter' ]; then continue; fi + if [ "$idl_file" = './examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter' ]; then continue; fi + if [ "$idl_file" = './examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO' ]; then continue; fi + if [ "$idl_file" = './examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter' ]; then continue; fi + if [ "$idl_file" = './examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter' ]; then continue; fi + if [ "$idl_file" = './examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter' ]; then continue; fi + if [ "$idl_file" = './examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter' ]; then continue; fi + if [ "$idl_file" = './examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter' ]; then continue; fi + if [ "$idl_file" = './examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter' ]; then continue; fi + if [ "$idl_file" = './examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter' ]; then continue; fi + if [ "$idl_file" = './examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter' ]; then continue; fi + if [ "$idl_file" = './examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter' ]; then continue; fi + if [ "$idl_file" = './examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter' ]; then continue; fi + if [ "$idl_file" = './examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter' ]; then continue; fi + if [ "$idl_file" = './examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter' ]; then continue; fi + if [ "$idl_file" = './examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter' ]; then continue; fi + if [ "$idl_file" = './examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter' ]; then continue; fi + if [ "$idl_file" = './examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter' ]; then continue; fi + if [ "$idl_file" = './examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter' ]; then continue; fi + if [ "$idl_file" = './examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter' ]; then continue; fi + if [ "$idl_file" = './examples/lighting-app/lighting-common/lighting-app.matter' ]; then continue; fi if [ "$idl_file" = './examples/log-source-app/log-source-common/log-source-app.matter' ]; then continue; fi if [ "$idl_file" = './examples/placeholder/linux/apps/app1/config.matter' ]; then continue; fi if [ "$idl_file" = './examples/placeholder/linux/apps/app2/config.matter' ]; then continue; fi if [ "$idl_file" = './examples/thermostat/thermostat-common/thermostat.matter' ]; then continue; fi - if [ "$idl_file" = './examples/all-clusters-app/all-clusters-common/all-clusters-app.matter' ]; then continue; fi - if [ "$idl_file" = './examples/lighting-app/lighting-common/lighting-app.matter' ]; then continue; fi - if [ "$idl_file" = './examples/log-source-app/log-source-common/log-source-app.matter' ]; then continue; fi + if [ "$idl_file" = './examples/window-app/common/window-app.matter' ]; then continue; fi ./scripts/run_in_build_env.sh "./scripts/idl_lint.py --log-level warn $idl_file" >/dev/null || exit 1 done From a9484abcaf0da319e16ed34637ff6e8371dc82d2 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 14 Sep 2022 17:35:03 -0400 Subject: [PATCH 10/10] Use python3 instead of python for check_includes.py --- scripts/tools/check_includes.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/tools/check_includes.sh b/scripts/tools/check_includes.sh index 76f797cbfb248c..adccf798819a4a 100755 --- a/scripts/tools/check_includes.sh +++ b/scripts/tools/check_includes.sh @@ -16,4 +16,4 @@ # git grep -n -E '^[[:space:]]*#[[:space:]]*include[[:space:]]*[<"]' src | - python "${0%.*}.py" + python3 "${0%.*}.py"