Closed Bug 1542548 Opened 5 years ago Closed 3 months ago

Bugs in XUL parser for linting

Categories

(Developer Infrastructure :: Lint and Formatting, defect, P5)

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: darktrojan, Unassigned)

References

Details

There's a few things in comm-central the new parser can't handle:

Also if there's an included file with an error, there's no line number in the included file. But I guess that's not easy. :-)

We'd take a patch for this, but given there's not uses in m-c for those, it isn't going to be a priority for us any time soon.

Priority: -- → P5

(In reply to Geoff Lankow (:darktrojan) from comment #0)

There's a few things in comm-central the new parser can't handle:

I don't really know what this does...

What chokes here, the faux XML/sax parser (which we also use for XBL!) or something else?

Also if there's an included file with an error, there's no line number in the included file. But I guess that's not easy. :-)

This seems fixable by changing the includedRange structure to include an offset of sorts (which would be a sum of offsets for multiple levels of included files) and including the line number in the updated message in https://searchfox.org/mozilla-central/rev/6db0a6a56653355fcbb25c4fa79c6e7ffc6f88e9/tools/lint/eslint/eslint-plugin-mozilla/lib/processors/xul.js#232 .

(In reply to Mark Banner (:standard8) from comment #1)

We'd take a patch for this, but given there's not uses in m-c for those, it isn't going to be a priority for us any time soon.

I mean, the line number kind of has a use, but I agree it's not high priority... basically, I wrote the whole thing so that infra will go orange in case people check in broken JS in XUL code that they might not otherwise notice. Given there's efforts underway to switch browser.xul to XHTML, as well as to remove inline event handlers, I'm not sure how much longer we'll care about this. There are also other issues, such as not actually parsing inline <script> tags, and not detecting any global information (see https://searchfox.org/mozilla-central/source/tools/lint/eslint/eslint-plugin-mozilla/lib/processors/xul.js#177-190 ).

Blocks: 1534774

(In reply to :Gijs (he/him) from comment #2)

I don't really know what this does...

From the preprocessor docs:

Same as a #include except that all instances of variable in the included
file is also expanded as in #filter substitution

Product: Firefox Build System → Developer Infrastructure
Severity: normal → S3

We dropped the xul processor a while ago when we dropped xul files.

Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.