Topic on Extension talk:Linter

Update location of the lint error

6
星耀晨曦 (talkcontribs)

Assuming there are multiple errors on the same page, will the location of other errors be updated after an error is fixed?

SSastry (WMF) (talkcontribs)

It will get updated once the page is reparsed.

星耀晨曦 (talkcontribs)

Will only change the location, other properties (e.g. error id) will not change?

SSastry (WMF) (talkcontribs)

Error id also changes.

星耀晨曦 (talkcontribs)

It's bad news for me. If I query out 1, 2, 3, 4 error id before fix, assuming these errors are on the same page. I fixed No.1 error, after the error fix will wrong, because the location of the errors is based on the previous context (before fixed N0.1). Do you have any good ideas?

Now I think to fix only the first error and give up fixing the errors behind. If the error id is not changes..I can append a API query to update location..

SSastry (WMF) (talkcontribs)

Fix it in the reverse order of offsets .. i.e. fix the error with the largest offset first .. that way, offsets for errors earlier in the page won't change.