Skip to content

Do not put name of the MemberUsageExcluder in the error message #359

Description

@ruudk

Today I'm struggling with this wonderful library. I'm on version 1.1.0 (we can't upgrade to 1.1.1 because we need #356).

I'm suddenly getting these errors suddenly, on a branch I'm working on.

Property App\Shared\Infrastructure\Messaging\MessageBus\Symfony\Middleware\Stub\StubCommand::$id is never read
🔖 shipmonk.deadProperty.neverRead
↳ [tests/Shared/Infrastructure/.../Stub/StubCommand.php:10]

While I had this in my baseline:

$ignoreErrors[] = [
	'rawMessage' => 'Property App\\Shared\\Infrastructure\\Messaging\\MessageBus\\Symfony\\Middleware\\Stub\\StubCommand::$id is never read (all usages excluded by usageOverMixed excluder)',
	'identifier' => 'shipmonk.deadProperty.neverRead',
	'count' => 1,
	'path' => __DIR__ . '/tests/Shared/Infrastructure/Messaging/MessageBus/Symfony/Middleware/Stub/StubCommand.php',
];

On thing that caught my attention is that the baseline talks about (all usages excluded by usageOverMixed excluder) while the new error does not have that.

But there are many more errors, that are similar, in inverse:

	'rawMessage' => 'Property App\\Shared\\Infrastructure\\DraftTicketFields::$id is never read (all usages excluded by tests, usageOverMixed excluders)',

vs

Property App\Shared\Infrastructure\DraftTicketFields::$id is never read (all usages excluded by tests excluder)

I have these errors randomly on my branch, but also have seen it on other branches.

There must be something going on when how these excluders are executed. Maybe the order of them is also not deterministic.

I think we should not include these references to the excluders, because it proofs that things can go flaky.

But maybe we should focus on finding what causes it to go flaky.

The branch I work on has nothing to do with any of these files, that is what makes it so weird.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions