From c24fe956b040cf27d8edc6d5957d5dfaef133d59 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Fri, 3 Jun 2022 09:56:28 -0400 Subject: [PATCH 1/2] Add better mandatory cluster rules in matterlint --- scripts/rules.matterlint | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/scripts/rules.matterlint b/scripts/rules.matterlint index b2fa3245788f1e..c93f86b3b2ce63 100644 --- a/scripts/rules.matterlint +++ b/scripts/rules.matterlint @@ -79,9 +79,25 @@ all endpoints { endpoint 0 { // Identifiers for clusters are loaded from XML files + // The required clusters are from the spec for RootNode (section 2.1.5 at the moment): + require server cluster Basic; + require server cluster AccessControl; require server cluster GroupKeyManagement; - require server cluster NetworkCommissioning; require server cluster GeneralCommissioning; - require server cluster OTASoftwareUpdateRequestor; + require server cluster AdministratorCommissioning; + require server cluster OperationalCredentials; + require server cluster GeneralDiagnostics; + + // Required only if !CustomNetworkConfig. For now assume yes for matter examples + require server cluster NetworkCommissioning; + + // If Ethernet + // require server cluster EthernetNetworkDiagnostics; + + // If WiFi + // require server cluster WiFiNetworkDiagnostics; + + // If Thread + // require server cluster ThreadNetworkDiagnostics; } From 669f36c92e088a0ed765b71930f496a9667032f6 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Fri, 3 Jun 2022 10:34:51 -0400 Subject: [PATCH 2/2] Code review updates - do not make network commissioning required --- scripts/rules.matterlint | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/rules.matterlint b/scripts/rules.matterlint index c93f86b3b2ce63..3c93551496148f 100644 --- a/scripts/rules.matterlint +++ b/scripts/rules.matterlint @@ -89,8 +89,8 @@ endpoint 0 { require server cluster OperationalCredentials; require server cluster GeneralDiagnostics; - // Required only if !CustomNetworkConfig. For now assume yes for matter examples - require server cluster NetworkCommissioning; + // Required only if !CustomNetworkConfig. + // require server cluster NetworkCommissioning; // If Ethernet // require server cluster EthernetNetworkDiagnostics;