Remove trailing spaces and introduce -Wtrailing-whitespace=any compiler flag#1813
Conversation
60c3420 to
65f0e7f
Compare
real-or-random
left a comment
There was a problem hiding this comment.
Concept ACK...
I was a bit surprised to see that GCC has this option given that it's not primarily a linter, but okay, happy to take them if they're for free.
I think if we enable this, we could as well enable -Wleading-whitespace=spaces?
65f0e7f to
d9c3235
Compare
|
Thank you for the review! Your feedback has been addressed.
Done. |
real-or-random
left a comment
There was a problem hiding this comment.
utACK d9c3235
The CI failures on QEMU jobs are certainly unrelated, but let's maybe wait for the non-QEMU jobs.
Hmm... The failed runs are reusing old Docker images, so there shouldn't be any changes in that environment. |
|
I agree that this is very dubious. I've just triggered a rerun of all jobs. Let's see if this solves it. And if not, we can still check if the same jobs fail as in the first run. Clearing the cache may also be some other shot in the dark, but let's wait for now. |
They differ... |
|
|
This could very well be the reason. Let's just wait for a day to let this settle a bit. (I'm, in principle, happy to merge this PR as-is, but then CI may end up being red on master, which I would like to avoid.) |
FWIW, I've triggered a cache invalidation in hebasto@94ec4e2, and the resulting CI run is 100% green. |
Do you want me to rebase this PR to get a clean CI run? |
Sounds good |
d9c3235 to
86cae58
Compare
Rebased. |
|
LGTM |
57315a6985 Merge bitcoin-core/secp256k1#1813: Remove trailing spaces and introduce `-Wtrailing-whitespace=any` compiler flag 86cae58d2f build: Add `-Wleading-whitespace=spaces` compiler flag fb229e7602 build: Add `-Wtrailing-whitespace=any` compiler flag 13e3bee504 refactor: Remove trailing whitespace 453949ab2a Merge bitcoin-core/secp256k1#1816: ci: Rotate Docker cache keys cd49c57e44 Merge bitcoin-core/secp256k1#1814: release process: mention the `[Unreleased]` link clearly 2ccff6eb73 ci: Add weekly schedule 2f18567d24 ci: Rotate Docker cache keys every 4 weeks 0ffb1749a5 ci, docker: Fix LLVM repository signature failure 0267b65512 release process: mention the `[Unreleased]` link clearly 1605b02f75 Merge bitcoin-core/secp256k1#1775: Add CMake build directory patterns to `.gitignore` 748c0fdd67 Add CMake build directory patterns to `.gitignore` 7eb86bdb01 autotools: Rename `build-aux` to `autotools-aux` git-subtree-dir: src/secp256k1 git-subtree-split: 57315a69853c9bd4765fccf20b541d47f1b45ca9
d405713 ci: use Alpine 3.23 (fanquake) 1cee0e4 ci: detect apk usage generally (fanquake) 9d4c9b0 Squashed 'src/secp256k1/' changes from 14e56970cb..57315a6985 (fanquake) Pull request description: Updates the secp256k1 subtree to latest master (bitcoin-core/secp256k1@57315a6), which includes bitcoin-core/secp256k1#1813. ACKs for top commit: maflcko: lgtm ACK d405713 hebasto: ACK d405713. Tree-SHA512: 6f01f85c309d7b823f41f215a9c856871dcd3d4113ac38cf2cf8e2f2c8a4c9d5f3c9f0e12b95cd9140045c66523eeb49aa536c0e91f9d17d5bf81fc95a2ad689
4d79f01fd6 fullagg: Add docs 0227909997 fullagg: Add to build system 5f8445fbb4 fullagg: Add to CI 31151b5ce1 fullagg: Add example 6fc2f996ae fullagg: Add include file 51aec0a6ed fullagg: Add module b6f2b94ec0 refactor: Move parsing helpers from musig to eckey 7f237a8789 Experimental: Add incremental half-aggregation for Schnorr signatures 4dffc4ce47 batch: make add functions void & introduce reset 6bd5cf1d6b batch: remove `batch_usable` api ea2aee51a9 batch: make tests functions internal & static 3ca67a134e fix typos & index the right inputs for benchmarks 999067412b batch: remove experimental status 5febd610bf test: fix ci failures 0f18ef9955 batch: Generate speedup graphs d69ff1a774 batch, extrakeys: Add benchmarks 4d50e05cb3 batch: Add tests for batch_add_* APIs 4661eced0a batch,ecmult: Add tests for core batch APIs and strauss_batch refactor e7766bce41 batch: Add example 6a9bcc29ac batch: Add batch_add_* APIs 646c4e5ecb batch, ecmult: Add batch_verify and refactor strauss_batch 58c589af10 batch: Add create and destroy APIs 99c297cede batch: Initialize an experimental batch module 97de5120cf Merge bitcoin-core/secp256k1#1804: test: show both CMake and Autotools usage for ctime_tests 57315a6985 Merge bitcoin-core/secp256k1#1813: Remove trailing spaces and introduce `-Wtrailing-whitespace=any` compiler flag 86cae58d2f build: Add `-Wleading-whitespace=spaces` compiler flag fb229e7602 build: Add `-Wtrailing-whitespace=any` compiler flag 13e3bee504 refactor: Remove trailing whitespace 453949ab2a Merge bitcoin-core/secp256k1#1816: ci: Rotate Docker cache keys cd49c57e44 Merge bitcoin-core/secp256k1#1814: release process: mention the `[Unreleased]` link clearly 2ccff6eb73 ci: Add weekly schedule 2f18567d24 ci: Rotate Docker cache keys every 4 weeks 0ffb1749a5 ci, docker: Fix LLVM repository signature failure 0267b65512 release process: mention the `[Unreleased]` link clearly 1605b02f75 Merge bitcoin-core/secp256k1#1775: Add CMake build directory patterns to `.gitignore` 14e56970cb Merge bitcoin-core/secp256k1#1794: ecmult: Use size_t for array indices c7a52400d6 Merge bitcoin-core/secp256k1#1809: release cleanup: bump version after 0.7.1 ae7eb729c0 release cleanup: bump version after 0.7.1 1a53f4961f Merge bitcoin-core/secp256k1#1808: Prepare for 0.7.1 20a209f11c release: prepare for 0.7.1 c4b6a81a60 changelog: update in preparation for the v0.7.1 release ebb35882da Merge bitcoin-core/secp256k1#1796: bench: fail early if user inputs invalid value for SECP256K1_BENCH_ITERS c09215f7af bench: fail early if user inputs invalid value for SECP256K1_BENCH_ITERS 1bc74a22f8 test: show both Autotools and CMake usage for ctime_tests 471e3a130d Merge bitcoin-core/secp256k1#1800: sage: verify Eisenstein integer connection for GLV constants 29ac4d8491 sage: verify Eisenstein integer connection for GLV constants 4721e077b4 Merge bitcoin-core/secp256k1#1793: doc/bench: added help text for SECP256K1_BENCH_ITERS env var for bench_ecmult bd5ced1fe1 doc/bench: added help text for SECP256K1_BENCH_ITERS env var for bench_ecmult 47eb70959a ecmult: Use size_t for array indices in _odd_multiplies_table bb1d199de5 ecmult: Use size_t for array indices into tables 2d9137ce9d Merge bitcoin-core/secp256k1#1764: group: Avoid using infinity field directly in other modules f9a944ff2d Merge bitcoin-core/secp256k1#1790: doc: include arg -DSECP256K1_USE_EXTERNAL_DEFAULT_CALLBACKS=ON for cmake 0406cfc4d1 doc: include arg -DUSE_EXTERNAL_DEFAULT_CALLBACKS=1 for cmake 8d445730ec Merge bitcoin-core/secp256k1#1783: Add VERIFY_CHECKs and documentation that flags must be 0 or 1 aa2a39c1a7 Merge bitcoin-core/secp256k1#1778: doc/bench: Added cmake build options to bench error messages 540fec8ae9 Merge bitcoin-core/secp256k1#1788: test: split monolithic ellswift test into independent cases d822b29021 test: split monolithic ellswift test into independent cases ae00c552df Add VERIFY_CHECKs that flags are 0 or 1 5c75183344 Merge bitcoin-core/secp256k1#1784: refactor: remove ret from secp256k1_ec_pubkey_serialize be5e4f02fd Merge bitcoin-core/secp256k1#1779: Add ARG_CHECKs to ensure "array of pointers" elements are non-NULL 3daab83a60 refactor: remove ret from secp256k1_ec_pubkey_serialize 8bcda186d2 test: Add non-NULL checks for "pointer of array" API functions 5a08c1bcdc Add ARG_CHECKs to ensure "array of pointers" elements are non-NULL 3b5b03f301 doc/bench: Added cmake build options to bench error messages e7f7083b53 Merge bitcoin-core/secp256k1#1774: refactor: split up internal pubkey serialization function into compressed/uncompressed variants 748c0fdd67 Add CMake build directory patterns to `.gitignore` 7eb86bdb01 autotools: Rename `build-aux` to `autotools-aux` b6c2a3cd77 Merge bitcoin-core/secp256k1#1761: ecmult_multi: reduce strauss memory usage by 30% f5e815f430 remove secp256k1_eckey_pubkey_serialize function 0d3659c547 use new `_eckey_pubkey_serialize{33,65}` functions in modules (ellswift,musig) adb76f82ea use new `_eckey_pubkey_serialize{33,65}` functions in public API fc7458ca3e introduce `secp256k1_eckey_pubkey_serialize{33,65}` functions 2f73e5281d group: Avoid using infinity field directly in other modules 26166c4f5f ecmult_multi: reduce strauss memory usage by 30% REVERT: 15ea24cb8c batch: make add functions void & introduce reset REVERT: bfcc479a35 batch: remove `batch_usable` api REVERT: 15e388e096 batch: make tests functions internal & static REVERT: aac054a373 fix typos & index the right inputs for benchmarks REVERT: c07e710003 batch: remove experimental status REVERT: 49fb753393 test: fix ci failures REVERT: e96dabb4af batch: Generate speedup graphs REVERT: b0b3425cd4 batch, extrakeys: Add benchmarks REVERT: 9d5115156b batch: Add tests for batch_add_* APIs REVERT: 668199c917 batch,ecmult: Add tests for core batch APIs and strauss_batch refactor REVERT: 53a158203f batch: Add example REVERT: b40b4186b8 batch: Add batch_add_* APIs REVERT: 2bed1cb6ee batch, ecmult: Add batch_verify and refactor strauss_batch REVERT: 8f13eeae31 batch: Add create and destroy APIs REVERT: 0b6b0c87ad batch: Initialize an experimental batch module git-subtree-dir: src/secp256k1 git-subtree-split: 4d79f01fd63f5f8ada532ce58911e64a964628d8
…17, 1815, 1819, 1823, 1821, 1760, 1828, 1829, 1825, 1832, 1811 48cbd78 modules: Port bitcoin-core/secp256k1#1825 to zkp-specific code (mllwchrry) 126501f modules: Port bitcoin-core/secp256k1#1815 to zkp-specific code (mllwchrry) c49c9be bench: Update help functions in bench and bench_internal (kevkevinpal) 8d0eda0 testrand: Remove testrand_finish (Tim Ruffing) f48b1bf hash: add midstate initializer and use it for tagged hashes (w0xlt) 79e9f25 ci: Fix leftover use of old ECMULTGENPRECISION (Tim Ruffing) 76e92cf Revert "ci, docker: Fix LLVM repository signature failure" (Hennadii Stepanov) 8354618 cmake: Set `LABELS` property for tests (Hennadii Stepanov) 29f26ec cmake: Integrate DiscoverTests and normalize test names (Hennadii Stepanov) f95b263 cmake: Add DiscoverTests module (Hennadii Stepanov) 4ac6511 cmake, refactor: Deduplicate test-related code (Hennadii Stepanov) b99a94c Add tests for bad scalar inputs in ellswift XDH (gzJx0DuTRHytnHe7P5RmMbPf3wKy2BztweVGXTf) 307b49f ellswift: fix overflow flag handling in secp256k1_ellswift_xdh (gzJx0DuTRHytnHe7P5RmMbPf3wKy2BztweVGXTf) ed02466 ci: Load Docker image by ID from builder step (Hennadii Stepanov) f47bbc0 test: add unit tests for secp256k1_scalar_check_overflow (Rohit Yadav) 97b3c47 refactor: remove unnecessary `malloc` result casts (Sebastian Falbesoner) 3ae72e7 ci: Disable Docker build summary generation (Hennadii Stepanov) 4fb7ccf ci: Enforce base-10 evaluation (Hennadii Stepanov) 1bc74a2 test: show both Autotools and CMake usage for ctime_tests (8144225309) 86cae58 build: Add `-Wleading-whitespace=spaces` compiler flag (Hennadii Stepanov) fb229e7 build: Add `-Wtrailing-whitespace=any` compiler flag (Hennadii Stepanov) 13e3bee refactor: Remove trailing whitespace (Hennadii Stepanov) 2ccff6e ci: Add weekly schedule (Hennadii Stepanov) 2f18567 ci: Rotate Docker cache keys every 4 weeks (Hennadii Stepanov) 0ffb174 ci, docker: Fix LLVM repository signature failure (Hennadii Stepanov) 0267b65 release process: mention the `[Unreleased]` link clearly (Jonas Nick) 748c0fd Add CMake build directory patterns to `.gitignore` (Hennadii Stepanov) 7eb86bd autotools: Rename `build-aux` to `autotools-aux` (Hennadii Stepanov) 47eb709 ecmult: Use size_t for array indices in _odd_multiplies_table (Tim Ruffing) bb1d199 ecmult: Use size_t for array indices into tables (Tim Ruffing) Pull request description: Merge bitcoin-core/secp256k1#1794: ecmult: Use size_t for array indices Merge bitcoin-core/secp256k1#1775: Add CMake build directory patterns to `.gitignore` Merge bitcoin-core/secp256k1#1814: release process: mention the `[Unreleased]` link clearly Merge bitcoin-core/secp256k1#1816: ci: Rotate Docker cache keys Merge bitcoin-core/secp256k1#1813: Remove trailing spaces and introduce `-Wtrailing-whitespace=any` compiler flag Merge bitcoin-core/secp256k1#1804: test: show both CMake and Autotools usage for ctime_tests Merge bitcoin-core/secp256k1#1818: ci: Enforce base-10 evaluation Merge bitcoin-core/secp256k1#1817: ci: Disable Docker build summary generation Merge bitcoin-core/secp256k1#1815: refactor: remove unnecessary `malloc` result casts Merge bitcoin-core/secp256k1#1819: tests: Improve secp256k1_scalar_check_overflow tests (Issue #1812) Merge bitcoin-core/secp256k1#1823: ci: Load Docker image by ID from builder step Merge bitcoin-core/secp256k1#1821: ellswift: fix overflow flag handling in secp256k1_ellswift_xdh Merge bitcoin-core/secp256k1#1760: cmake: Add dynamic test discovery to improve parallelism Merge bitcoin-core/secp256k1#1828: Revert "ci, docker: Fix LLVM repository signature failure" Merge bitcoin-core/secp256k1#1829: ci: Fix leftover use of old ECMULTGENPRECISION Merge bitcoin-core/secp256k1#1825: hash: remove redundant `secp256k1_sha256_initialize` in tagged hash midstate functions Merge bitcoin-core/secp256k1#1832: testrand: Remove testrand_finish Merge bitcoin-core/secp256k1#1811: bench: Update help functions in bench and bench_internal This PR can be recreated with `./contrib/sync-upstream.sh -b master range c0a2aba`. Tips: * Use `git show --remerge-diff <pr-branch>` to show the conflict resolution in the merge commit. * Use `git read-tree --reset -u <pr-branch>` to replay these resolutions during the conflict resolution stage when recreating the PR branch locally. Be aware that this may discard your index as well as the uncommitted changes and untracked files in your worktree. ACKs for top commit: real-or-random: ACK 48cbd78 Tree-SHA512: 1ea96bf3b7458c02bb472ca7423eb21defe6640ea58a993ac24603d6a8d44ac9bbeab7e2ca5f993918fa1388b9e69b308dcc67277afffd55cb833ecf07051c75
This PR removes trailing whitespace and introduces the
-Wtrailing-whitespace=anycompiler flag. This enforces the rule from CONTRIBUTING.md ("Avoid trailing whitespace") directly in the CI.This fix is required to unbreak Bitcoin Core CI builds using GCC 15 after merging bitcoin/bitcoin#34412.