ignored line numbers in the baseline#621
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #621 +/- ##
============================================
- Coverage 98.29% 98.25% -0.05%
- Complexity 696 700 +4
============================================
Files 87 87
Lines 1991 2000 +9
============================================
+ Hits 1957 1965 +8
- Misses 34 35 +1
🚀 New features to boost your workflow:
|
micheleorselli
left a comment
There was a problem hiding this comment.
If I got the code right, with this change if a user generates a baseline with --ignore-baseline-linenumbers then every comparison with that baseline would (obviously) ignore line numbers, meaning that if the tool is run with --ignore-baseline-linenumbers or not, it would produce the same result
💭 In my opinion the long term solution should be rethinking the way the baseline works. The user should not be forced to know about line numbers, it should just work. Psalm and PHPStan do use baseline, so we could see how they do it
|
I agree @micheleorselli , I would suggest to merge this PR and create a new issue as an IDEA with your vision. |
|
I think we should add a section in the readme in which document all the configurations... |
Fix --ignore-baseline-linenumbers not applied when generating baseline
Fixes #620
When using --generate-baseline --ignore-baseline-linenumbers, line numbers were still written to the baseline file.
The flag only affected runtime comparison, not serialization, causing constant merge conflicts in large teams on legacy codebases.
Line numbers are now stripped before saving when --ignore-baseline-linenumbers is passed. No existing behaviour is affected — the fix only applies when both flags are used together.