Skip to content

Mozlint publisher ignores lineoffset, so multi-line warnings aren't posted inline #3399

@flodolo

Description

@flodolo

I have updated compare-locales to provide a lineoffset on top of lineno when finding an error in a multiline string. Turns out that doesn't do anything.

The mozlint parser in hardcodes nb_lines=1 and never reads the lineoffset field from the mozlint JSON artifact (guessing it should use lineoffset + 1).

As a result, warnings that apply to a multi-line entity are anchored to a single line and dropped from publishing when that line isn't part of the diff.

Example revision: https://phabricator.services.mozilla.com/D304024 — 4 changed strings, only a general comment, no inline comments.

P.S. compare-locales still has an issue, because I set lineoffset as a value, not as a tuple. I honestly don't understand why that's the case, since lineno is already defined.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions