Add comment whitespace check to Fluent linter
Categories
(Core :: Internationalization: Localization, enhancement)
Tracking
()
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 | ||
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
•
|
||
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.
Comment 2•3 years ago
|
||
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 👍
Assignee | ||
Comment 3•3 years ago
|
||
Assignee | ||
Comment 4•3 years ago
|
||
Depends on D105369
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
Comment 6•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/d3ef456529ee
https://hg.mozilla.org/mozilla-central/rev/af581d99dc49
Description
•