codespell.rst (929B)
1 Codespell 2 ========= 3 4 `codespell <https://github.com/codespell-project/codespell/>`__ is a popular tool to look for typical typos in the source code. 5 6 It is enabled mostly for the documentation and English locale files. 7 8 Run Locally 9 ----------- 10 11 The mozlint integration of codespell can be run using mach: 12 13 .. parsed-literal:: 14 15 $ mach lint --linter codespell <file paths> 16 17 18 Configuration 19 ------------- 20 21 To enable codespell on new directory, add the path to the include 22 section in the :searchfox:`codespell.yml <tools/lint/codespell.yml>` file. 23 24 This job is configured as `tier 2 <https://wiki.mozilla.org/Sheriffing/Job_Visibility_Policy#Overview_of_the_Job_Visibility_Tiers>`_. 25 26 Autofix 27 ------- 28 29 Codespell provides a ``--fix`` option. It is based on the ``-w`` option provided by upstream. 30 31 32 Sources 33 ------- 34 35 * :searchfox:`Configuration (YAML) <tools/lint/codespell.yml>` 36 * :searchfox:`Source <tools/lint/spell/__init__.py>`