WordPress / WordPress/plugin-check

Non-line specific issues should output line 1 instead of 0

Open
#983 1 comment 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.