file-perm.rst (1024B)
1 File permission 2 =============== 3 4 This linter verifies if a file has unnecessary permissions. 5 If a file has execution permissions (+x), file-perm will 6 generate a warning. 7 8 It will ignore files starting with ``#!`` for types of files 9 that typically have shebang lines (such as python, node or 10 shell scripts). 11 12 This linter does not have any affect on Windows. 13 14 15 Run Locally 16 ----------- 17 18 This mozlint linter can be run using mach: 19 20 .. parsed-literal:: 21 22 $ mach lint --linter file-perm <file paths> 23 24 25 Configuration 26 ------------- 27 28 This linter is enabled on the whole code base. 29 30 This job is configured as `tier 2 <https://wiki.mozilla.org/Sheriffing/Job_Visibility_Policy#Overview_of_the_Job_Visibility_Tiers>`_. 31 32 Autofix 33 ------- 34 35 This linter provides a ``--fix`` option. The python script is doing the change itself. 36 37 38 Sources 39 ------- 40 41 * `Configuration (YAML) <https://searchfox.org/mozilla-central/source/tools/lint/file-perm.yml>`_ 42 * `Source <https://searchfox.org/mozilla-central/source/tools/lint/file-perm/__init__.py>`_