Scripts and tools: Fix devtools/copyright_header.py to always honor exclusions #15258

pull Empact wants to merge 2 commits into bitcoin:master from Empact:copyright-header-abs changing 1 files +18 −29
  1. Empact commented at 7:47 am on January 25, 2019: member

    This script compared paths relative to the report directory to test for exclusion, meaning the EXCLUDE_DIRS directory exclusions did not work properly, as they were relative to the project root.

    Fix this by creating absolute paths through the combination of: ‘git ls-files –full-name’ and ‘git rev-parse –show-toplevel’

    Once this is done, we can stop testing for the names that would otherwise appear when exclusion of leveldb, secp256k1, etc., did not work as intended.

  2. Scripts and tools: Fix devtools/copyright_header.py to always honor exclusions
    This script compared paths relative to the report directory to test for exclusion,
    meaning the directory exclusions did not work properly, as they were relative to
    the project root.
    
    Fix this by creating absolute paths through the combination of:
    'git ls-files --full-name' and 'git rev-parse --show-toplevel'
    2434ab5c2a
  3. Scripts and tools: Drop no-longer-relevant copyright holder names
    Now that leveldb, secp256k1, etc. are reliably excluded, these
    names will not show up in the searched files.
    ad5e5a105e
  4. fanquake added the label Scripts and tools on Jan 25, 2019
  5. Empact commented at 7:49 am on January 25, 2019: member

    Before:

     0$ contrib/devtools/copyright_header.py report src
     1-------------------------------------------------------------------------------
     2720 files examined according to INCLUDE and EXCLUDE fnmatch rules
     3-------------------------------------------------------------------------------
     4
     5  26 with zero copyrights
     6 549 with one copyright
     7 143 with two copyrights
     8   2 with three copyrights
     9   0 with four or more copyrights
    10
    11-------------------------------------------------------------------------------
    12Copyrights with dominant style:
    13e.g. "Copyright (c)" and "<year>" or "<startYear>-<endYear>":
    14
    15 135 with 'Satoshi Nakamoto\n'
    16 492 with 'The Bitcoin Core developers\n'
    17 127 with 'The LevelDB Authors\. All rights reserved\.\n'
    18   1 with 'BitPay Inc\.\n'
    19   5 with 'Pieter Wuille\n'
    20  22 with 'Pieter Wuille +\*\n'
    21   2 with 'Pieter Wuille, Andrew Poelstra +\*\n'
    22   6 with 'Andrew Poelstra +\*\n'
    23   1 with 'Diederik Huys, Pieter Wuille +\*\n'
    24   1 with 'Intel Corporation'
    25   6 with 'The Zcash developers'
    26   1 with 'Jeremy Rubin'
    27
    28-------------------------------------------------------------------------------
    29Copyrights with year list style:
    30e.g. "Copyright (c)" and "<year1>, <year2>, ...":
    31
    32  25 with 'Pieter Wuille +\*\n'
    33   2 with 'Pieter Wuille, Gregory Maxwell +\*\n'
    34   1 with 'Thomas Daede, Cory Fields +\*\n'
    35
    36-------------------------------------------------------------------------------
    37Copyrights with no "(c)" style:
    38e.g. "Copyright" and "<year>" or "<startYear>-<endYear>":
    39
    40   3 with 'Bitcoin Core Developers\n'
    41   3 with 'The LevelDB Authors\. All rights reserved\.\n'
    42   7 with 'BitPay Inc\.\n'
    43   1 with 'Wladimir J. van der Laan\n'
    44
    45-------------------------------------------------------------------------------
    460 with unexpected copyright holder names
    47-------------------------------------------------------------------------------
    

    After:

     0$ contrib/devtools/copyright_header.py report src
     1-------------------------------------------------------------------------------
     2507 files examined according to INCLUDE and EXCLUDE fnmatch rules
     3-------------------------------------------------------------------------------
     4
     5  11 with zero copyrights
     6 355 with one copyright
     7 139 with two copyrights
     8   2 with three copyrights
     9   0 with four or more copyrights
    10
    11-------------------------------------------------------------------------------
    12Copyrights with dominant style:
    13e.g. "Copyright (c)" and "<year>" or "<startYear>-<endYear>":
    14
    15 135 with 'Satoshi Nakamoto\n'
    16 491 with 'The Bitcoin Core developers\n'
    17   5 with 'Pieter Wuille\n'
    18   1 with 'Intel Corporation'
    19   6 with 'The Zcash developers'
    20   1 with 'Jeremy Rubin'
    21
    22-------------------------------------------------------------------------------
    23Copyrights with year list style:
    24e.g. "Copyright (c)" and "<year1>, <year2>, ...":
    25
    26
    27-------------------------------------------------------------------------------
    28Copyrights with no "(c)" style:
    29e.g. "Copyright" and "<year>" or "<startYear>-<endYear>":
    30
    31
    32-------------------------------------------------------------------------------
    330 with unexpected copyright holder names
    34-------------------------------------------------------------------------------
    

    $ contrib/devtools/copyright_header.py report . is unchanged.

  6. DrahtBot commented at 3:04 am on January 26, 2019: member

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #15257 (Scripts and tools: Bump flake8 to 3.6.0 by Empact)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  7. MarcoFalke referenced this in commit b78f6c61c4 on Jan 26, 2019
  8. MarcoFalke merged this on Jan 26, 2019
  9. MarcoFalke closed this on Jan 26, 2019

  10. PastaPastaPasta referenced this in commit 511ec44ea1 on Jun 26, 2021
  11. PastaPastaPasta referenced this in commit 79b3c121f1 on Jun 26, 2021
  12. PastaPastaPasta referenced this in commit b92ab55b57 on Jun 27, 2021
  13. PastaPastaPasta referenced this in commit a8ff3437d3 on Jun 28, 2021
  14. Fabcien referenced this in commit 8de4a6bfaa on Jul 20, 2021
  15. Fabcien referenced this in commit cf7fcac26c on Jul 20, 2021
  16. DrahtBot locked this on Dec 16, 2021

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: 2024-12-19 09:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me