Skip to content

Handle split baselines#200

Open
clxswalther wants to merge 9 commits intostaabm:mainfrom
clxswalther:handle-split-baselines
Open

Handle split baselines#200
clxswalther wants to merge 9 commits intostaabm:mainfrom
clxswalther:handle-split-baselines

Conversation

@clxswalther
Copy link
Copy Markdown

This adds an option to handle baseline files that have been split into separate files

}

// Skip loader.neon, which is used for loading baselines in phpstan-baseline-filter, but is not a baseline itself.
if (str_ends_with($baseline, 'loader.neon')) {
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

this file-name related to https://github.com/shipmonk-rnd/phpstan-baseline-per-identifier and the file-name can be freely chosen. so skipping based on the file-name alone seems like a bad idea.

meanwhile the usage docs suggest to use a _loader.neon file, which might resolve this problem?

Copy link
Copy Markdown
Author

@clxswalther clxswalther Apr 1, 2026

Choose a reason for hiding this comment

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

Maybe a additional --exclude parameter could do the trick. That way it could even work for other implementations.

Copy link
Copy Markdown
Owner

@staabm staabm Apr 1, 2026

Choose a reason for hiding this comment

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

yes. and --exclude should be also a glob-pattern

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