documentation-developer
documentation-developer copied to clipboard
[CI] Added code samples testing with Deptrac
Target: 5.0 only, for new code only.
Deptrac is a code testing tool for architecture.
I've added a very simple ruleset - code samples should not use classes outside of the Ibexa\Contracts namespace.
Together with @konradoboza we've also added a few additional exceptions - like SiteAccess configuration classes etc.
This tool should act as a:
- sanity check when adding code samples (as it's easy to miss the non-Contracts usage that can be replaced with their Contracts counterpart)
- point for discussion with developers (is there a
Contracts-compliantway of writing the code sample)
But we will never get rid of all the errors, as they would require architecture changes on the DXP side - so we will have to keep expanding the baseline with new code samples.
Generated baseline: https://github.com/ibexa/documentation-developer/blob/add-deptrac/deptrac.baseline.yaml