codespell: add an exclude list

RESOLVED FIXED in Firefox 61

Status

enhancement
RESOLVED FIXED
Last year
Last year

People

(Reporter: sylvestre, Assigned: sylvestre)

Tracking

Trunk
mozilla61
Dependency tree / graph

Firefox Tracking Flags

(firefox61 fixed)

Details

Attachments

(1 attachment)

We have some Mozilla specific words. I propose that we add an exclude list.
Comment hidden (mozreview-request)

Comment 2

Last year
mozreview-review
Comment on attachment 8969028 [details]
Bug 1455086 - codespell: add an exclude list

https://reviewboard.mozilla.org/r/237714/#review243674

Thanks, lgtm!

::: tools/lint/spell/__init__.py:101
(Diff revision 1)
> +    path_to_exclude_list = os.path.join(
> +        config['root'], "tools", "lint", "spell", "exclude-list.txt")

This is fine, so feel to ignore. But it might be better to find the path relative to this one (so we can move directories around easier).

At the top of the file:

    here = os.path.abspath(os.path.dirname(__file__))
    
Then:

    exclude_list = os.path.join(here, 'exclude-list-txt')

::: tools/lint/spell/__init__.py:112
(Diff revision 1)
>                  # 2: disable warnings about binary file
>                  # 4: shut down warnings about automatic fixes
>                  #    that were disabled in dictionary.
>                  '--quiet-level=4',
> +                '--ignore-words=' + path_to_exclude_list,
> +                '--skip=exclude-list.txt',

Shouldn't this also use the `path_to_exclude_list` variable?
Attachment #8969028 - Flags: review?(ahalberstadt) → review+
Comment hidden (mozreview-request)
Assignee

Comment 4

Last year
mozreview-review-reply
Comment on attachment 8969028 [details]
Bug 1455086 - codespell: add an exclude list

https://reviewboard.mozilla.org/r/237714/#review243674

> Shouldn't this also use the `path_to_exclude_list` variable?

codespell can handle just the filename:
Example:
./mach lint -l codespell -n tools/lint/spell/exclude-list.txt

Comment 5

Last year
Pushed by sledru@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e73fe9c25c94
codespell: add an exclude list r=ahal
Assignee

Updated

Last year
Blocks: 1455451

Comment 6

Last year
bugherder
https://hg.mozilla.org/mozilla-central/rev/e73fe9c25c94
Status: NEW → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in before you can comment on or make changes to this bug.