WordPress / WordPress/plugin-check
Non-line specific issues should output line 1 instead of 0
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 362
- Forks
- 126
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 22
Description
Some errors are reported at line 0 - unfortunately this means that some post-processing tools, will skip those errors or report an error/not work as expected, since lines generally start at 1
(besides the fact that some IDE file protocols won't work with line=0 either)
I understand why you chose line 0 and it makes absolute sense - it's just that it causes some compatibility issues.
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 by tracing the PHP code that formats non-line-specific errors and identify where line 0 is assigned. Update the behavior so these errors report line 1, then run the relevant error-output tests or reproduce a non-line-specific error to confirm downstream-compatible output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100