diff options
author | Eunoia <33084435+Eunoia1729@users.noreply.github.com> | 2022-04-07 20:20:22 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-20 05:21:13 +0000 |
commit | 4a9e36dbaf96f83d0829f8442114a2fa36641776 (patch) | |
tree | 8b5573518077184c7b81ddd03c6006f6e88820d8 /test/lint/lint-submodule.py | |
parent | 254f3cc3684cdb7468e353596a89e8fe7a302b9b (diff) | |
download | bitcoin-4a9e36dbaf96f83d0829f8442114a2fa36641776.tar.xz |
lint: convert submodule linter test to Python
Diffstat (limited to 'test/lint/lint-submodule.py')
-rwxr-xr-x | test/lint/lint-submodule.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/lint/lint-submodule.py b/test/lint/lint-submodule.py new file mode 100755 index 0000000000..89d4c80f55 --- /dev/null +++ b/test/lint/lint-submodule.py @@ -0,0 +1,23 @@ +#!/usr/bin/env python3 +# +# Copyright (c) 2022 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. + +""" +This script checks for git modules +""" + +import subprocess +import sys + +def main(): + submodules_list = subprocess.check_output(['git', 'submodule', 'status', '--recursive'], + universal_newlines = True, encoding = 'utf8').rstrip('\n') + if submodules_list: + print("These submodules were found, delete them:\n", submodules_list) + sys.exit(1) + sys.exit(0) + +if __name__ == '__main__': + main() |