Page MenuHomePhabricator

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

Authored by PiRK on Jul 20 2021, 09:09.

Details

Summary

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'

This is a backport of core#15258 [1/2]
https://github.com/bitcoin/bitcoin/pull/15258/commits/2434ab5c2afd61aa0cf81f80b1b236ea52d1d20d

Test Plan

./contrib/devtools/copyright_header.py report .

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 16219
Build 32307: Build Diff
Build 32306: arc lint + arc unit