Skip to content

Group violations per rule in output #282

@annervisser

Description

@annervisser

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: #281 (comment)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions