Skip to content

Add target label to layering check violation message - #1893

Open
adincebic wants to merge 1 commit into
mainfrom
adin/enrich-layering_check
Open

Add target label to layering check violation message#1893
adincebic wants to merge 1 commit into
mainfrom
adin/enrich-layering_check

Conversation

@adincebic

Copy link
Copy Markdown
Contributor

Previously the layering check violation would only report the Swift module name that is not directly declared as a dependency.
Now we make sure that target label is captured and displayed to the user so that it is easier to act upon it.

Previously:

error: Layering violation in @@//test/fixtures/layering_check:layering_violation
The following modules were imported, but they are not direct dependencies of the target:

    TransitiveDependency

Please add the correct 'deps' to @@//test/fixtures/layering_check:layering_violation to import those modules.

now:

error: Layering violation in @@//test/fixtures/layering_check:layering_violation
The following modules were imported, but they are not direct dependencies of the target:

    TransitiveDependency (@@//test/fixtures/layering_check:TransitiveDependency)

Please add the correct 'deps' to @@//test/fixtures/layering_check:layering_violation to import those modules.

Users can now add the dependency way quicker and there could even be an automated way to add the missing dep since the label is present.

@adincebic
adincebic force-pushed the adin/enrich-layering_check branch from 12d0fc1 to 5b83e5c Compare August 30, 2026 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant