Closed Bug 1944412 Opened 1 year ago Closed 1 year ago

Suggest assert method to use in message for no-comparison-or-assignment-inside-ok

Categories

(Developer Infrastructure :: Lint and Formatting, task)

Tracking

(firefox136 fixed)

RESOLVED FIXED
136 Branch
Tracking Status
firefox136 --- fixed

People

(Reporter: jdescottes, Assigned: jdescottes)

Details

Attachments

(1 file)

The linter rule no-comparison-or-assignment-inside-ok could include the suggested assertion method in the message directly.

I don't always remember the various assert helpers we have. Even though the fix can replace the code correctly, it would be nice to have the information in the linter message.

Eg:

Use dedicated assertion methods rather than ok(a > b).

could be

Use dedicated assertion methods (Assert.greater) rather than ok(a > b).

Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Pushed by jdescottes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5c72f0dd4424 Add assert method in lint message for no-comparison-or-assignment-inside-ok r=Standard8,frontend-codestyle-reviewers,Gijs
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 136 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: