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:

    $ contrib/devtools/copyright_header.py report src
    -------------------------------------------------------------------------------
    720 files examined according to INCLUDE and EXCLUDE fnmatch rules
    -------------------------------------------------------------------------------
    
      26 with zero copyrights
     549 with one copyright
     143 with two copyrights
       2 with three copyrights
       0 with four or more copyrights
    
    -------------------------------------------------------------------------------
    Copyrights with dominant style:
    e.g. "Copyright (c)" and "<year>" or "<startYear>-<endYear>":
    
     135 with 'Satoshi Nakamoto\n'
     492 with 'The Bitcoin Core developers\n'
     127 with 'The LevelDB Authors\. All rights reserved\.\n'
       1 with 'BitPay Inc\.\n'
       5 with 'Pieter Wuille\n'
      22 with 'Pieter Wuille +\*\n'
       2 with 'Pieter Wuille, Andrew Poelstra +\*\n'
       6 with 'Andrew Poelstra +\*\n'
       1 with 'Diederik Huys, Pieter Wuille +\*\n'
       1 with 'Intel Corporation'
       6 with 'The Zcash developers'
       1 with 'Jeremy Rubin'
    
    -------------------------------------------------------------------------------
    Copyrights with year list style:
    e.g. "Copyright (c)" and "<year1>, <year2>, ...":
    
      25 with 'Pieter Wuille +\*\n'
       2 with 'Pieter Wuille, Gregory Maxwell +\*\n'
       1 with 'Thomas Daede, Cory Fields +\*\n'
    
    -------------------------------------------------------------------------------
    Copyrights with no "(c)" style:
    e.g. "Copyright" and "<year>" or "<startYear>-<endYear>":
    
       3 with 'Bitcoin Core Developers\n'
       3 with 'The LevelDB Authors\. All rights reserved\.\n'
       7 with 'BitPay Inc\.\n'
       1 with 'Wladimir J. van der Laan\n'
    
    -------------------------------------------------------------------------------
    0 with unexpected copyright holder names
    -------------------------------------------------------------------------------
    

    After:

    $ contrib/devtools/copyright_header.py report src
    -------------------------------------------------------------------------------
    507 files examined according to INCLUDE and EXCLUDE fnmatch rules
    -------------------------------------------------------------------------------
    
      11 with zero copyrights
     355 with one copyright
     139 with two copyrights
       2 with three copyrights
       0 with four or more copyrights
    
    -------------------------------------------------------------------------------
    Copyrights with dominant style:
    e.g. "Copyright (c)" and "<year>" or "<startYear>-<endYear>":
    
     135 with 'Satoshi Nakamoto\n'
     491 with 'The Bitcoin Core developers\n'
       5 with 'Pieter Wuille\n'
       1 with 'Intel Corporation'
       6 with 'The Zcash developers'
       1 with 'Jeremy Rubin'
    
    -------------------------------------------------------------------------------
    Copyrights with year list style:
    e.g. "Copyright (c)" and "<year1>, <year2>, ...":
    
    
    -------------------------------------------------------------------------------
    Copyrights with no "(c)" style:
    e.g. "Copyright" and "<year>" or "<startYear>-<endYear>":
    
    
    -------------------------------------------------------------------------------
    0 with unexpected copyright holder names
    -------------------------------------------------------------------------------
    

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

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

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--174a7506f384e20aa4161008e828411d-->

    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
Contributors

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-03 06:14 UTC

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