Skip to content

Commit 3567b24

Browse files
committed
test: Add lint to prevent SIGNAL/SLOT connect style
1 parent f78558f commit 3567b24

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

test/lint/lint-qt.sh

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright (c) 2018 The Bitcoin Core developers
4+
# Distributed under the MIT software license, see the accompanying
5+
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
6+
#
7+
# Check for SIGNAL/SLOT connect style, removed since Qt4 support drop.
8+
9+
export LC_ALL=C
10+
11+
EXIT_CODE=0
12+
13+
OUTPUT=$(git grep -E '(SIGNAL|, ?SLOT)\(' -- src/qt)
14+
if [[ ${OUTPUT} != "" ]]; then
15+
echo "Use Qt5 connect style in:"
16+
echo "$OUTPUT"
17+
EXIT_CODE=1
18+
fi
19+
20+
exit ${EXIT_CODE}

0 commit comments

Comments
 (0)