lintpref.rst (889B)
1 Lintpref 2 ======== 3 4 The lintpref linter is a simple linter for libpref files to check for duplicate 5 entries between :searchfox:`modules/libpref/init/all.js` and 6 :searchfox:`modules/libpref/init/StaticPrefList.yaml`. If a duplicate is found, 7 lintpref will raise an error and emit the ``all.js`` line where you can find 8 the duplicate entry. 9 10 11 Running Locally 12 --------------- 13 14 The linter can be run using mach: 15 16 .. parsed-literal:: 17 18 $ mach lint --linter lintpref 19 20 21 Fixing Lintpref Errors 22 ---------------------- 23 24 In most cases, duplicate entries should be avoided and the duplicate removed 25 from ``all.js``. If for any reason a pref should exist in both files, the pref 26 should be added to ``IGNORE_PREFS`` in :searchfox:`tools/lint/libpref/__init__.py`. 27 28 Sources 29 ------- 30 31 * :searchfox:`Configuration (YAML) <tools/lint/lintpref.yml>` 32 * :searchfox:`Source <tools/lint/libpref/__init__.py>`