Skip to content

Documentation error #80

Open
Open
@opensource21

Description

@opensource21

Hi in the documentation I found

classpath().withSlicing(
		"mainVsTest",
		"de.schauderhaft.**(Test)",
		new NamedPattern("main", "de.schauderhaft.*.**"))

how ever it seems that the name must be defined at the end. So

classpath().withSlicing(
		"mainVsTest",
		"de.schauderhaft.**(Test)",
		new NamedPattern("de.schauderhaft.*.**", "main"))

should be correct. However even then a test like

       ConstraintBuilder testObject =
                classpath().noJars().
                including(SZE_BASE_PACKAGE + "**").
                excluding("**.package-info").
                withSlicing(
                        "mainVsTest",
                        SZE_BASE_PACKAGE + ".**(Test)",
                        new NamedPattern(SZE_BASE_PACKAGE + ".*.**", "main")).
                allow("main", "Test");
        assertThat(testObject, is(violationFree()));

doesn't fail, even if I only allow the wrong direction. I came to this issue, trying to define a test which disallow references to any class which is in the package **.(impl).**. Again it's hard to track or debug the slice-definition.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions