Closed Bug 1691751 Opened 3 years ago Closed 3 years ago

Add comment whitespace check to Fluent linter

Categories

(Core :: Internationalization: Localization, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
87 Branch
Tracking Status
firefox87 --- fixed

People

(Reporter: dminor, Assigned: gregtatum)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

The preferred style is to have an empty line following group level (##) and file level (###) comments.

Assignee: nobody → gtatum

How strict should we be here?

I could see checking the following as well:

  • That the resource-level comment (###) should be at the top of the file, immediately after the license comment.
  • There should be an empty line before group level (##) and file level (###) comments.
  • Only 1 ### comment per file.
  • A ## comment must be followed by a message. So two ## in a row will be an error.
Flags: needinfo?(francesco.lodolo)

There should be an empty line before group level (##) and file level (###) comments.

I would amend this: there should an empty line before and after. I think the empty line before is useful for readability.
It might look a bit weird when you have an empty comment ##, to reset it, but I think that's OK.

A ## comment must be followed by a message. So two ## in a row will be an error.

We might have files where we still reset the comment at the end with ##. I think it's still good to have this though, end just fix those files.

Having said that, the list looks great to me 👍

Flags: needinfo?(francesco.lodolo)
Pushed by gtatum@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d3ef456529ee
Add whitespace rules for the Fluent linter; r=flod,dminor,fluent-reviewers
https://hg.mozilla.org/integration/autoland/rev/af581d99dc49
Fix Fluent linting whitespace issues; r=dminor,flod
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 87 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: