forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
, bitcoin#28240, bitcoin#27012, bitcoin#25713, bitcoin#24971, bitcoin#25047 (clang-tidy and IWYU) 4009777 refactor: apply IWYU to `rpc/{fees,signmessage}.cpp` (Kittywhiskers Van Gogh) 85d96c2 merge bitcoin#25047: add readability-redundant-declaration (Kittywhiskers Van Gogh) 71b400d merge bitcoin#24971: modernize-use-nullptr (Kittywhiskers Van Gogh) 104ba87 merge bitcoin#25713: run clang-tidy in quiet mode (Kittywhiskers Van Gogh) 5647652 merge bitcoin#27012: Print iwyu patch in git diff format (Kittywhiskers Van Gogh) 2980992 merge bitcoin#28240: Remove unused boost signals2 from torcontrol (Kittywhiskers Van Gogh) 8e8faa2 merge bitcoin#24831: add include-what-you-use (Kittywhiskers Van Gogh) c673048 merge bitcoin#24753: Add clang-tidy task (Kittywhiskers Van Gogh) a6e80ec merge bitcoin#22903: Enable clang-tidy bugprone-argument-comment and fix violations (Kittywhiskers Van Gogh) Pull request description: ## Additional Information * While linting is generally reserved for our `arm_linux` build variant, utilizing IWYU (which in turns relies on `bear` for the compilation database, also relied upon by `clang-tidy`) requires a version paired to the Clang version ([source](https://github.com/dashpay/dash/blob/0b42caa2e84636e9a2901b485ea87627014a013b/contrib/containers/ci/Dockerfile#L139)) used to build the target codebase. This means it has to be run on a build variant that uses Clang. We have opted to use `linux64_multiprocess` as it the most lightweight Clang build variant available (compared to fuzz, UBSan and TSan variants which come with sanitizers tacked on). * An earlier version of this PR ([source](https://github.com/dashpay/dash/tree/2676eb914d7a1ca6a0f194fe5c573294c3ebee2f)) attempted to apply IWYU to Dash-specific code. This attempt was aborted because IWYU was found to behave non-deterministically. Furthermore, while IWYU will tell you what headers to use, it will not do the following: * Respect the usage of angle brackets for source headers (it will almost always suggest quotation marks) * Use C++-style headers (it will prefer `string.h` over `cstring` and changing it is a manual errand) * Apply its suggestions in alphabetical order (they will pool up at the bottom) * Respect newlines meant to separate sets of headers * Remain consistent (even if IWYU passes locally, there is no guarantee that it would translate to a green CI run) But it will do the following: * Change its suggestions based on the ordering of headers * Make suggestions to add headers/forward declarations and then when run a second time, urge you to remove them * Pull in implementation headers that shouldn't be directly included. IWYU currently ships with mappings to avoid this for the standard library ([source](https://github.com/include-what-you-use/include-what-you-use/blob/f88f045131bfa0ac709d1e0c103580666254b2c6/gcc.libc.imp)), Qt ([source](https://github.com/include-what-you-use/include-what-you-use/blob/f88f045131bfa0ac709d1e0c103580666254b2c6/qt5_11.imp)) and Boost ([source](https://github.com/include-what-you-use/include-what-you-use/blob/f88f045131bfa0ac709d1e0c103580666254b2c6/boost-all.imp)) but for all else, you're on your own. It was determined for now that we will simply take guidance from upstream on the matter and extend it to Dash code at some point in the future. * Both [bitcoin#25029](bitcoin#25029) and [bitcoin#25013](bitcoin#25013) made sure they pass IWYU, changes needed to ensure that the linter is satisfied were made in this PR. ## Breaking Changes None expected. ## Checklist - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas **(note: N/A)** - [x] I have added or updated relevant unit/integration/functional/e2e tests **(note: N/A)** - [x] I have made corresponding changes to the documentation **(note: N/A)** - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: UdjinM6: utACK 4009777 PastaPastaPasta: utACK 4009777 Tree-SHA512: 0dae87abfd1f309300a3caadff565da831122591611cb0f6a7dc620e3edc775aeef954935b19035e2fd5b8334bd2281fb05b193a3bdb0844cd0f03890f506212
- Loading branch information
Showing
37 changed files
with
160 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Fixups / upstreamed changes | ||
[ | ||
{ include: [ "<bits/termios-c_lflag.h>", private, "<termios.h>", public ] }, | ||
{ include: [ "<bits/termios-struct.h>", private, "<termios.h>", public ] }, | ||
{ include: [ "<bits/termios-tcflow.h>", private, "<termios.h>", public ] }, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"output": { | ||
"content": { | ||
"include_only_existing_source": true, | ||
"paths_to_include": [], | ||
"paths_to_exclude": [ | ||
"src/crc32", | ||
"src/crypto/x11", | ||
"src/dashbls", | ||
"src/gsl", | ||
"src/immer", | ||
"src/leveldb", | ||
"src/minisketch", | ||
"src/univalue", | ||
"src/secp256k1" | ||
] | ||
}, | ||
"format": { | ||
"command_as_array": true, | ||
"drop_output_field": false | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Checks: ' | ||
-*, | ||
bugprone-argument-comment, | ||
modernize-use-nullptr, | ||
readability-redundant-declaration, | ||
' | ||
WarningsAsErrors: ' | ||
bugprone-argument-comment, | ||
modernize-use-nullptr, | ||
readability-redundant-declaration, | ||
' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.