arkitect icon indicating copy to clipboard operation
arkitect copied to clipboard

Group violations per rule in output

Open annervisser opened this issue 2 years ago • 3 comments

Feature Request

Q A
New Feature yes
RFC yes
BC Break no

Summary

Currently the output of violations is grouped by class (fqcn), and all violations are listed under that. If violations were additionally grouped per rule, this could add to the clarity of the output AND reduce the line-length by splitting into more lines.

The output would look something like this:

App\Domain\Model has 2 violations:
  violated rule: should not depend on classes outside namespace App\Domain because we want protect our domain
    - App\Domain\Model depends on App\Services\UserService (on line 14)
    - App\Domain\Model depends on App\Services\OtherService (on line 26)
  violated rule: should implement EntityInterface

This idea came up in discussion in this PR: https://github.com/phparkitect/arkitect/pull/281#issuecomment-1216711549

I'd be able to pick this up and create a pull request when I have some spare time if this is a wanted feature

annervisser avatar Aug 16 '22 17:08 annervisser

Thanks @annervisser, let me know if you need some help!

AlessandroMinoccheri avatar Aug 16 '22 20:08 AlessandroMinoccheri

is this the same request as #187 ?

dbu avatar Feb 14 '23 10:02 dbu

Yes @dbu it seems the same request!

AlessandroMinoccheri avatar Feb 14 '23 10:02 AlessandroMinoccheri