dot-mozilla-reference.rst (1715B)
1 Dot Mozilla Reference 2 ===================== 3 4 This linter is to help ensure that new code that adds references to ".mozilla" does not do so without ensuring that X Desktop Group (XDG) configuration path handling is taken care of. 5 6 The `XDG Base Directory Specification <https://specifications.freedesktop.org/basedir-spec/0.8/>`_ 7 provides a set of environment variables as well as directories that 8 applications should follow to store their data: configurations, states, caches etc. 9 10 Firefox originally used ``$HOME/.mozilla`` but after Firefox 143 (bug 259356), it will prefer the environment variables over the legacy location. 11 12 If you are adding a path that would reference ``.mozilla``, then you should: 13 14 * Contact the `OS Integration team` 15 16 * Add handling like e.g. in :searchfox:`crash reporter client application <../rev/f30ba9df8307c48346ac1038be981595bd585603/toolkit/crashreporter/client/app/src/config.rs#511-532>` 17 18 * Add an exclusion to the relevant section in :searchfox:`tools/lint/dot-mozilla-reference.yml <tools/lint/dot-mozilla-reference.yml>` 19 20 If you are adding code that uses ``.mozilla`` for something other than referencing the data path, then you may: 21 22 * Add an exclusion to the relevant section in :searchfox:`tools/lint/dot-mozilla-reference.yml <tools/lint/dot-mozilla-reference.yml>` 23 24 Run Locally 25 ----------- 26 27 The mozlint integration of codespell can be run using mach: 28 29 .. parsed-literal:: 30 31 $ mach lint --linter dot-mozilla-reference <file paths> 32 33 34 Configuration 35 ------------- 36 37 This linter is enabled on the whole code base. See the description above for details on handling exclusions. 38 39 Sources 40 ------- 41 42 * :searchfox:`Configuration (YAML) <tools/lint/dot-mozilla-reference.yml>`