lint: Add linter to detect wrong file permissions #17830

pull emilengler wants to merge 1 commits into bitcoin:master from emilengler:2019-12-test-file-permissions changing 2 files +39 −0
  1. emilengler commented at 11:29 PM on December 29, 2019: contributor

    This adds a test to avoid stuff like #17806

  2. emilengler commented at 11:33 PM on December 29, 2019: contributor

    Interesting, the linter says a specific file has the wrong file permission but on my system it has the correct already

  3. fanquake added the label Tests on Dec 29, 2019
  4. in test/lint/check-permissions.py:11 in 0db1e45ec8 outdated
       6 | +# This test checks if all test files have the 755 unix permission (-rwxr-xr-x)
       7 | +
       8 | +import os
       9 | +import stat
      10 | +from os import listdir
      11 | +from pathlib import Path
    


    fjahr commented at 4:18 PM on January 2, 2020:

    unused

  5. in test/lint/check-permissions.py:9 in 0db1e45ec8 outdated
       0 | @@ -0,0 +1,39 @@
       1 | +#!/usr/bin/env python3
       2 | +# Copyright (c) 2017 The Bitcoin Core developers
       3 | +# Distributed under the MIT software license, see the accompanying
       4 | +# file COPYING or http://www.opensource.org/licenses/mit-license.php.
       5 | +#
       6 | +# This test checks if all test files have the 755 unix permission (-rwxr-xr-x)
       7 | +
       8 | +import os
       9 | +import stat
    


    fjahr commented at 4:19 PM on January 2, 2020:

    unused

  6. fjahr approved
  7. fjahr commented at 4:20 PM on January 2, 2020: contributor

    Concept ACK

    But currently, another linter fails on your script, see my comments :)

    Edit: commit message should probably be changed to "lint: Add linter to detect wrong file permissions"

  8. jonatack commented at 5:55 PM on January 2, 2020: contributor

    -0.1 on concept, -0.8 on execution. Has this ever come up with other contributions in the past? Without further justification this seems to be addressing a non-issue with code that needs to be maintained.

  9. fanquake added the label Waiting for author on Jan 4, 2020
  10. emilengler commented at 3:40 PM on January 4, 2020: contributor

    @jonatack

    Has this ever come up with other contributions in the past?

    Yes see #17806

  11. lint: Add linter to detect wrong file permissions cf0d233d8e
  12. emilengler force-pushed on Jan 4, 2020
  13. emilengler renamed this:
    test: Add test to detect wrong file permissions
    lint: Add linter to detect wrong file permissions
    on Jan 4, 2020
  14. emilengler commented at 4:12 PM on January 4, 2020: contributor

    Looks like this is impossible because of git. It only supports two filemodes

  15. emilengler closed this on Jan 4, 2020

  16. theStack cross-referenced this on Mar 22, 2020 from issue test: add executable flag for rpc_estimatefee.py by theStack
  17. fanquake referenced this in commit 57a8fa9c3b on Mar 23, 2020
  18. MarcoFalke commented at 12:21 PM on March 23, 2020: member

    This check could be a one line check in the test_runner.py before the script is executed?

  19. fanquake removed the label Waiting for author on May 28, 2020
  20. bitcoin locked this on Feb 15, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-19 06:54 UTC