Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error count by type #33

Merged
merged 2 commits into from
Jan 20, 2025
Merged

Fix error count by type #33

merged 2 commits into from
Jan 20, 2025

Conversation

Ph0tonic
Copy link
Contributor

@Ph0tonic Ph0tonic commented Jan 17, 2025

The error count in php by type is invalid. It currently only counts the number of entries in the file but an entry might have multiple occurrences.

Example:

<?php declare(strict_types = 1);

// total 1 error

$ignoreErrors = [];
$ignoreErrors[] = [
    'message' => '#^Variable \\$service in PHPDoc tag @var does not exist\\.$#',
    'count' => 2,
    'path' => __DIR__ . '/src/demo.php',
];

return ['parameters' => ['ignoreErrors' => $ignoreErrors]];

The total number of errors should be 2.

Copy link
Member

@janedbal janedbal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add/adjust tests

@Ph0tonic
Copy link
Contributor Author

Here it is @janedbal 👍

@janedbal janedbal merged commit 8f920df into shipmonk-rnd:master Jan 20, 2025
13 checks passed
@janedbal
Copy link
Member

Thank you

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.

2 participants