Skip to content

Commit

Permalink
scripted-diff: Add IWYU pragma keep to bitcoin-config.h includes
Browse files Browse the repository at this point in the history
-BEGIN VERIFY SCRIPT-
 perl -0777 -pi -e 's/#if defined\(HAVE_CONFIG_H\)\n#include <config\/bitcoin-config.h>.*\n#endif.*\n/#include <config\/bitcoin-config.h> \/\/ IWYU pragma: keep\n/g' $( git grep -l '#include <config/bitcoin-config.h>' )
-END VERIFY SCRIPT-
  • Loading branch information
MarcoFalke committed May 1, 2024
1 parent 842f7fd commit dddd40b
Show file tree
Hide file tree
Showing 77 changed files with 77 additions and 231 deletions.
4 changes: 1 addition & 3 deletions src/addrdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif
#include <config/bitcoin-config.h> // IWYU pragma: keep

#include <addrdb.h>

Expand Down
4 changes: 1 addition & 3 deletions src/addrman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif
#include <config/bitcoin-config.h> // IWYU pragma: keep

#include <addrman.h>
#include <addrman_impl.h>
Expand Down
4 changes: 1 addition & 3 deletions src/bench/wallet_create.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or https://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif
#include <config/bitcoin-config.h> // IWYU pragma: keep

#include <bench/bench.h>
#include <node/context.h>
Expand Down
4 changes: 1 addition & 3 deletions src/bench/wallet_ismine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif // HAVE_CONFIG_H
#include <config/bitcoin-config.h> // IWYU pragma: keep
#include <bench/bench.h>
#include <interfaces/chain.h>
#include <key.h>
Expand Down
4 changes: 1 addition & 3 deletions src/bench/wallet_loading.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif
#include <config/bitcoin-config.h> // IWYU pragma: keep

#include <bench/bench.h>
#include <interfaces/chain.h>
Expand Down
4 changes: 1 addition & 3 deletions src/bitcoin-cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif
#include <config/bitcoin-config.h> // IWYU pragma: keep

#include <chainparamsbase.h>
#include <clientversion.h>
Expand Down
4 changes: 1 addition & 3 deletions src/bitcoin-tx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif
#include <config/bitcoin-config.h> // IWYU pragma: keep

#include <chainparamsbase.h>
#include <clientversion.h>
Expand Down
4 changes: 1 addition & 3 deletions src/bitcoin-util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif
#include <config/bitcoin-config.h> // IWYU pragma: keep

#include <arith_uint256.h>
#include <chain.h>
Expand Down
4 changes: 1 addition & 3 deletions src/bitcoin-wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif
#include <config/bitcoin-config.h> // IWYU pragma: keep

#include <chainparams.h>
#include <chainparamsbase.h>
Expand Down
4 changes: 1 addition & 3 deletions src/bitcoind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif
#include <config/bitcoin-config.h> // IWYU pragma: keep

#include <chainparams.h>
#include <clientversion.h>
Expand Down
4 changes: 1 addition & 3 deletions src/clientversion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif
#include <config/bitcoin-config.h> // IWYU pragma: keep

#include <clientversion.h>
#include <util/translation.h>
Expand Down
4 changes: 1 addition & 3 deletions src/clientversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@

#include <util/macros.h>

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif //HAVE_CONFIG_H
#include <config/bitcoin-config.h> // IWYU pragma: keep

// Check that required client information is defined
#if !defined(CLIENT_VERSION_MAJOR) || !defined(CLIENT_VERSION_MINOR) || !defined(CLIENT_VERSION_BUILD) || !defined(CLIENT_VERSION_IS_RELEASE) || !defined(COPYRIGHT_YEAR)
Expand Down
4 changes: 1 addition & 3 deletions src/common/run_command.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif
#include <config/bitcoin-config.h> // IWYU pragma: keep

#include <common/run_command.h>

Expand Down
4 changes: 1 addition & 3 deletions src/common/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@

#include <common/settings.h>

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif
#include <config/bitcoin-config.h> // IWYU pragma: keep

#include <tinyformat.h>
#include <univalue.h>
Expand Down
4 changes: 1 addition & 3 deletions src/common/system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif
#include <config/bitcoin-config.h> // IWYU pragma: keep

#include <common/system.h>

Expand Down
4 changes: 1 addition & 3 deletions src/common/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
#ifndef BITCOIN_COMMON_SYSTEM_H
#define BITCOIN_COMMON_SYSTEM_H

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif
#include <config/bitcoin-config.h> // IWYU pragma: keep

#include <cstdint>
#include <string>
Expand Down
4 changes: 1 addition & 3 deletions src/crypto/sha256.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif
#include <config/bitcoin-config.h> // IWYU pragma: keep

#include <crypto/sha256.h>
#include <crypto/common.h>
Expand Down
4 changes: 1 addition & 3 deletions src/httpserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif
#include <config/bitcoin-config.h> // IWYU pragma: keep

#include <httpserver.h>

Expand Down
4 changes: 1 addition & 3 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif
#include <config/bitcoin-config.h> // IWYU pragma: keep

#include <init.h>

Expand Down
4 changes: 1 addition & 3 deletions src/init/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif
#include <config/bitcoin-config.h> // IWYU pragma: keep

#include <clientversion.h>
#include <common/args.h>
Expand Down
4 changes: 1 addition & 3 deletions src/mapport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif
#include <config/bitcoin-config.h> // IWYU pragma: keep

#include <mapport.h>

Expand Down
4 changes: 1 addition & 3 deletions src/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif
#include <config/bitcoin-config.h> // IWYU pragma: keep

#include <net.h>

Expand Down
4 changes: 1 addition & 3 deletions src/netbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif
#include <config/bitcoin-config.h> // IWYU pragma: keep

#include <netbase.h>

Expand Down
4 changes: 1 addition & 3 deletions src/node/interfaces.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@
#include <validationinterface.h>
#include <warnings.h>

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif
#include <config/bitcoin-config.h> // IWYU pragma: keep

#include <any>
#include <memory>
Expand Down
4 changes: 1 addition & 3 deletions src/node/kernel_notifications.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@

#include <node/kernel_notifications.h>

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif
#include <config/bitcoin-config.h> // IWYU pragma: keep

#include <chain.h>
#include <common/args.h>
Expand Down
4 changes: 1 addition & 3 deletions src/qt/bitcoin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif
#include <config/bitcoin-config.h> // IWYU pragma: keep

#include <qt/bitcoin.h>

Expand Down
4 changes: 1 addition & 3 deletions src/qt/bitcoin.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
#ifndef BITCOIN_QT_BITCOIN_H
#define BITCOIN_QT_BITCOIN_H

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif
#include <config/bitcoin-config.h> // IWYU pragma: keep

#include <interfaces/node.h>
#include <qt/initexecutor.h>
Expand Down
4 changes: 1 addition & 3 deletions src/qt/bitcoingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif
#include <config/bitcoin-config.h> // IWYU pragma: keep

#include <qt/bitcoingui.h>

Expand Down
4 changes: 1 addition & 3 deletions src/qt/bitcoingui.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
#ifndef BITCOIN_QT_BITCOINGUI_H
#define BITCOIN_QT_BITCOINGUI_H

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif
#include <config/bitcoin-config.h> // IWYU pragma: keep

#include <qt/bitcoinunits.h>
#include <qt/clientmodel.h>
Expand Down
4 changes: 1 addition & 3 deletions src/qt/clientmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif
#include <config/bitcoin-config.h> // IWYU pragma: keep

#include <qt/clientmodel.h>

Expand Down
4 changes: 1 addition & 3 deletions src/qt/createwalletdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif
#include <config/bitcoin-config.h> // IWYU pragma: keep

#include <interfaces/node.h>
#include <qt/createwalletdialog.h>
Expand Down
4 changes: 1 addition & 3 deletions src/qt/guiutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif
#include <config/bitcoin-config.h> // IWYU pragma: keep

#include <qt/guiutil.h>

Expand Down
4 changes: 1 addition & 3 deletions src/qt/intro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif
#include <config/bitcoin-config.h> // IWYU pragma: keep

#include <chainparams.h>
#include <qt/intro.h>
Expand Down
4 changes: 1 addition & 3 deletions src/qt/modaloverlay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif
#include <config/bitcoin-config.h> // IWYU pragma: keep

#include <qt/modaloverlay.h>
#include <qt/forms/ui_modaloverlay.h>
Expand Down
4 changes: 1 addition & 3 deletions src/qt/notificator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif
#include <config/bitcoin-config.h> // IWYU pragma: keep

#include <qt/notificator.h>

Expand Down
4 changes: 1 addition & 3 deletions src/qt/notificator.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
#ifndef BITCOIN_QT_NOTIFICATOR_H
#define BITCOIN_QT_NOTIFICATOR_H

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif
#include <config/bitcoin-config.h> // IWYU pragma: keep

#include <QIcon>
#include <QObject>
Expand Down

0 comments on commit dddd40b

Please sign in to comment.