Skip to content

Solution to partial analysis false positives over inline ignores#292

Merged
janedbal merged 2 commits intomasterfrom
partial-analysis
Mar 2, 2026
Merged

Solution to partial analysis false positives over inline ignores#292
janedbal merged 2 commits intomasterfrom
partial-analysis

Conversation

@janedbal
Copy link
Member

@janedbal janedbal commented Jan 30, 2026

Fix by:

parameters:
    errorFormat: filterOutUnmatchedInlineIgnoresDuringPartialAnalysis

janedbal added a commit to janedbal/phpstan-src that referenced this pull request Feb 23, 2026
Custom ErrorFormatter implementations that need to filter or modify
file-specific errors currently have to call the AnalysisResult
constructor directly, which is not part of the public API.

This adds an @api withFileSpecificErrors() method that returns a copy
of the result with different file-specific errors, allowing extensions
to create modified results without relying on internal constructor.

See shipmonk-rnd/dead-code-detector#292
ondrejmirtes pushed a commit to phpstan/phpstan-src that referenced this pull request Feb 26, 2026
Custom ErrorFormatter implementations that need to filter or modify
file-specific errors currently have to call the AnalysisResult
constructor directly, which is not part of the public API.

This adds an @api withFileSpecificErrors() method that returns a copy
of the result with different file-specific errors, allowing extensions
to create modified results without relying on internal constructor.

See shipmonk-rnd/dead-code-detector#292
@janedbal janedbal merged commit d6ba2c4 into master Mar 2, 2026
40 checks passed
@janedbal janedbal deleted the partial-analysis branch March 2, 2026 16:15
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