Closed Bug 1780072 Opened 3 years ago Closed 1 year ago

Linter should yell if using !=, ==, === or !== inside assertion conditions

Categories

(Developer Infrastructure :: Lint and Formatting, task)

Desktop
All

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1780071

People

(Reporter: Gijs, Unassigned)

Details

+++ This bug was initially created as a clone of Bug #1780071 +++

Bug 1780071 is about typoing like this:

ok(foo == "bar", "Check foo is bar");

into

ok(foo = "bar", "Check foo is bar");

But I would actually also suggest that the former should be linted into

is(foo, "bar", "Check foo is bar");

This would yield better debugging information if the test fails (gives both values, not just true/false), is easier to read, and can't be typoed into an assignment.

Product: Firefox Build System → Developer Infrastructure

I ended up implementing this in bug 1780071 anyway.

Status: NEW → RESOLVED
Closed: 1 year ago
No longer depends on: 1780071
Duplicate of bug: 1780071
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.