project-chip / connectedhomeip

Matter (formerly Project CHIP) creates more connections between more objects, simplifying development for manufacturers and increasing compatibility for consumers, guided by the Connectivity Standards Alliance.
https://buildwithmatter.com
Apache License 2.0
7.33k stars 1.97k forks source link

[CI/CD] Add extra lint/validators for cluster XMLs #30749

Open andy31415 opened 9 months ago

andy31415 commented 9 months ago

We currently do not validate XML for clusters at all for the chip XMLs that reside in https://github.com/project-chip/connectedhomeip/tree/master/src/app/zap-templates/zcl/data-model/chip

In theory we have https://github.com/project-chip/zap/blob/master/zcl-builtin/shared/schema/zcl.xsd that can validate the schema. Should figure out how zap-cli could be used to validate this or if not, use the xsd from the zap repo itself (even though that may be a version mismatch).

We also likely want some extra validation for some common typos (like forcing casing on things), to avoid PRs like https://github.com/project-chip/connectedhomeip/pull/30740 and https://github.com/project-chip/connectedhomeip/pull/29706 needing to be done over and over again.

This may need splitting into separate tasks:

andy31415 commented 9 months ago

we should catch typos such as found by #31015