error formatting inconsistency regarding spaces
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 40.4k
- Forks
- 8.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 96
Description
Description
running automated tests in private repo, I recently noticed that some error messages contain more spaces then other
(macos vs. ubuntu github action)
The following code:
<?php
function subtract_no_lint($m { // intentional syntax error
}
Resulted in this output: (note 2 spaces after Parse error:)
Parse error: syntax error, unexpected token "{", expecting ")" in does-not-lint.php on line 3
But I expected this output instead: (note 1 space after Parse error:)
Parse error: syntax error, unexpected token "{", expecting ")" in does-not-lint.php on line 3
I saw similar differences in the php-src testsuite, see e.g.
PHP Version
8.3.11
Operating System
ubuntu / macos
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the shown does-not-lint.php syntax error and the related php-src testsuite cases, comparing their output on Ubuntu and macOS. Trace where the parser error text is formatted and update the relevant tests so the spacing is consistent across platforms.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100