Skip to content

[CI] [POC] Added code samples testing with Deptrac #2562

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mnocon
Copy link
Contributor

@mnocon mnocon commented Nov 30, 2024

Target: master, 4.6

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.

This tool should act as a:

  1. sanity check when adding code samples (as it's easy to miss the non-Contracts usage that can be replaced with their Contracts counterpart)
  2. point for discussion with developers (is there a Contracts-compliant way 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.

Commits:

  • f4593c0 adds the tool configuration
  • f73c60e fixes some low hanging fruits and generates the baseline

Generated baseline:
https://github.com/ibexa/documentation-developer/blob/add-deptrac/deptrac.baseline.yaml

@mnocon mnocon marked this pull request as ready for review December 2, 2024 10:52
@mnocon mnocon changed the title [CI] Added code samples testing with Deptrac [CI] [POC] Added code samples testing with Deptrac Dec 2, 2024
@ibexa ibexa deleted a comment from github-actions bot Feb 5, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant