mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-19 09:53:47 +01:00
Merge bitcoin/bitcoin#29479: test: Refactor subtree exclusion in lint tests
80fa7da21c
test: Refactor subtree exclusion in lint tests (Brandon Odiwuor) Pull request description: Fixes https://github.com/bitcoin/bitcoin/issues/17413 Refactor subtree exclusion in lint tests to one place Second attempt after PR: https://github.com/bitcoin/bitcoin/pull/24435 ACKs for top commit: fjahr: re-ACK80fa7da21c
maflcko: lgtm ACK80fa7da21c
davidgumberg: ACK80fa7da21c
Tree-SHA512: deff7457dd19ca5ea440d3d53feae047e8863b9ddeb6494a3c94605a5d16edc91db8f99a435b4fab2ef89aedee42439562be006da647fb85bbf3def903a3ce50
This commit is contained in:
commit
28f2ca675f
@ -87,3 +87,7 @@ To do so, add the upstream repository as remote:
|
||||
```
|
||||
git remote add --fetch secp256k1 https://github.com/bitcoin-core/secp256k1.git
|
||||
```
|
||||
|
||||
lint_ignore_dirs.py
|
||||
===================
|
||||
Add list of common directories to ignore when running tests
|
||||
|
@ -12,19 +12,17 @@ import re
|
||||
import sys
|
||||
from subprocess import check_output
|
||||
|
||||
from lint_ignore_dirs import SHARED_EXCLUDED_SUBTREES
|
||||
|
||||
|
||||
HEADER_ID_PREFIX = 'BITCOIN_'
|
||||
HEADER_ID_SUFFIX = '_H'
|
||||
|
||||
EXCLUDE_FILES_WITH_PREFIX = ['contrib/devtools/bitcoin-tidy',
|
||||
'src/crypto/ctaes',
|
||||
'src/leveldb',
|
||||
'src/crc32c',
|
||||
'src/secp256k1',
|
||||
'src/minisketch',
|
||||
'src/tinyformat.h',
|
||||
'src/bench/nanobench.h',
|
||||
'src/test/fuzz/FuzzedDataProvider.h']
|
||||
'src/test/fuzz/FuzzedDataProvider.h'] + SHARED_EXCLUDED_SUBTREES
|
||||
|
||||
|
||||
def _get_header_file_lst() -> list[str]:
|
||||
|
@ -14,13 +14,11 @@ import sys
|
||||
|
||||
from subprocess import check_output, CalledProcessError
|
||||
|
||||
from lint_ignore_dirs import SHARED_EXCLUDED_SUBTREES
|
||||
|
||||
|
||||
EXCLUDED_DIRS = ["contrib/devtools/bitcoin-tidy/",
|
||||
"src/leveldb/",
|
||||
"src/crc32c/",
|
||||
"src/secp256k1/",
|
||||
"src/minisketch/",
|
||||
]
|
||||
] + SHARED_EXCLUDED_SUBTREES
|
||||
|
||||
EXPECTED_BOOST_INCLUDES = ["boost/date_time/posix_time/posix_time.hpp",
|
||||
"boost/multi_index/detail/hash_index_iterator.hpp",
|
||||
|
@ -11,8 +11,11 @@ Note: Will exit successfully regardless of spelling errors.
|
||||
|
||||
from subprocess import check_output, STDOUT, CalledProcessError
|
||||
|
||||
from lint_ignore_dirs import SHARED_EXCLUDED_SUBTREES
|
||||
|
||||
IGNORE_WORDS_FILE = 'test/lint/spelling.ignore-words.txt'
|
||||
FILES_ARGS = ['git', 'ls-files', '--', ":(exclude)build-aux/m4/", ":(exclude)contrib/seeds/*.txt", ":(exclude)depends/", ":(exclude)doc/release-notes/", ":(exclude)src/leveldb/", ":(exclude)src/crc32c/", ":(exclude)src/qt/locale/", ":(exclude)src/qt/*.qrc", ":(exclude)src/secp256k1/", ":(exclude)src/minisketch/", ":(exclude)contrib/guix/patches"]
|
||||
FILES_ARGS = ['git', 'ls-files', '--', ":(exclude)build-aux/m4/", ":(exclude)contrib/seeds/*.txt", ":(exclude)depends/", ":(exclude)doc/release-notes/", ":(exclude)src/qt/locale/", ":(exclude)src/qt/*.qrc", ":(exclude)contrib/guix/patches"]
|
||||
FILES_ARGS += [f":(exclude){dir}" for dir in SHARED_EXCLUDED_SUBTREES]
|
||||
|
||||
|
||||
def check_codespell_install():
|
||||
|
5
test/lint/lint_ignore_dirs.py
Normal file
5
test/lint/lint_ignore_dirs.py
Normal file
@ -0,0 +1,5 @@
|
||||
SHARED_EXCLUDED_SUBTREES = ["src/leveldb/",
|
||||
"src/crc32c/",
|
||||
"src/secp256k1/",
|
||||
"src/minisketch/",
|
||||
]
|
Loading…
Reference in New Issue
Block a user