aboutsummaryrefslogtreecommitdiff
path: root/ci/lint
AgeCommit message (Collapse)Author
2024-03-26ci: use codespell 2.2.6fanquake
2024-03-21lint: Fix COMMIT_RANGE issuesMarcoFalke
2024-02-20lint: Check for missing or redundant bitcoin-config.h includesMarcoFalke
2023-11-13lint: Report all lint errors instead of early exitMarcoFalke
2023-11-13Merge bitcoin/bitcoin#28076: util: Replace std::filesystem with util/fs.hfanquake
bbbbdb0cd57d75a06357d2811363d30a498f4499 ci: Add filesystem lint check (MarcoFalke) fada2f91108a56cc5c447bd6b6fac411e4d5cdca refactor: Replace <filesystem> with <util/fs.h> (MarcoFalke) Pull request description: Using `std::filesystem` is problematic: * There is a `fs` namespace wrapper for it. So having two ways to achieve the same is confusing. * Not using the `fs` wrapper is dangerous and buggy, because it disables known bugs by deleting problematic functions. Fix all issues by removing use of it and adding a linter to avoid using it again in the future. ACKs for top commit: TheCharlatan: ACK bbbbdb0cd57d75a06357d2811363d30a498f4499 fanquake: ACK bbbbdb0cd57d75a06357d2811363d30a498f4499 🦀 Tree-SHA512: 0e2d49742b08eb2635e6fce41485277cb9c40fe20b81017c391d3472a43787db1278a236825714ca1e41c9d2f59913865cfb0c649e3c8ab1fb598c849f80c660
2023-10-13ci: Add missing CI_RETRY_EXE before git cloneMarcoFalke
2023-09-14ci: Add filesystem lint checkMarcoFalke
2023-07-31script: update flake8 to 6.1.0Jon Atack
and touch up the spelling returned by lint-spelling.py
2023-07-24ci: Set PATH inside the CI envMarcoFalke
This is needed for the next commit. This also requires dropping CI_RETRY from the docker build step, which is fine, because CI_RETRY should be called inside the build script, not outside. Also, fix a doc typo.
2023-07-19lint: Add missing `set -ex` to ci/lint/06_script.shMarcoFalke
This is needed for the container-entrypoint.sh Also, remove unused `source` from ci/lint_run_all.sh, since it is the last step.
2023-07-19doc: Add doc comment to ci/test_imagefileMarcoFalke
(Similar to the doc comment in ci/lint_imagefile) Also, rename docker-entrypoint.sh to container-entrypoint.sh Also, add copyright header to touched files.
2023-07-16ci: Use DOCKER_BUILDKIT for lint imageMarcoFalke
Can be reviewed with: --color-moved=dimmed-zebra --ignore-all-space
2023-06-29script: update linter dependenciesJon Atack
2023-05-29lint: stop ignoring LIEF importsfanquake
Type stubs are now available as of 0.13.0. See https://github.com/lief-project/LIEF/issues/650.
2023-04-21ci: Bump ci/lint/DockerfileMarcoFalke
This bump should not be needed, see discussion starting at https://github.com/bitcoin/bitcoin/pull/27483#issuecomment-1517739626
2023-01-19Merge bitcoin/bitcoin#26906: test: add an easy way to run linters locallyMarcoFalke
b68e5a7feff3e93027e75da0cd9a590fef99aac1 lint: specify the right commit range when running locally (James O'Beirne) dff7ed5732c01b3ba47ef9e9ddb687d073d7739d test: add an easy way to run linters locally (James O'Beirne) Pull request description: Adds a Dockerfile configuration ~~(originally written mostly by fanquake)~~ that allows straightforward running of linters with compatible versions locally. This removes a ton of annoyance when trying to appease CI, because many of the linter versions are quite old and difficult to maintain locally. I realize that people may not be thrilled to add more ancillary tooling to the repo, but I think this makes a lot of sense given the linter versions listed in this container configuration are dictated by this repo (within the CI configuration), so having these things live in two separate places is a recipe for version mismatches. Eventually we can likely just use this container on CI directly to avoid any chance of inconsistencies between local dev experience and CI. ACKs for top commit: aureleoules: ACK b68e5a7feff3e93027e75da0cd9a590fef99aac1 stickies-v: ACK b68e5a7fe john-moffett: ACK b68e5a7feff3e93027e75da0cd9a590fef99aac1 Tree-SHA512: 7ef7a5dae023d81fdb6296d5d92dfa074ee321c7993e607c9f014d0f21c91558611aa00fc3ce1edc7b5e68371aea0d27fa1931291a79bb867a6c783bb536775f
2023-01-18lint: specify the right commit range when running locallyJames O'Beirne
When running lints on Cirrus, a special envvar is set ($CIRRUS_PR); emulate this when running linters locally by setting $LOCAL_BRANCH to any value.
2023-01-18test: add an easy way to run linters locallyJames O'Beirne
Adds a Dockerfile configuration that allows straightforward running of linters with compatible versions locally. This removes a ton of annoyance when trying to appease CI, because many of the linter versions are quite old and difficult to maintain locally. I realize that people may not be thrilled to more ancillary tooling to the repo, but I think this makes a lot of sense given the linter versions listed in this container configuration are dictated by this repo (within the CI configuration), so having these things live in two separate places is a recipe for version mismatches. Eventually we can likely just use this container on CI directly to avoid any chance of inconsistencies between local dev experience and CI.
2023-01-17ci: Add missing lint dependencyMarcoFalke
2023-01-17Merge bitcoin/bitcoin#26716: ci: Build python from source in "lint" taskMarcoFalke
123043e99cf3aab9eef7e381b133477b518ac4d0 ci: Bump lint task image to Ubuntu Jammy (Hennadii Stepanov) 9b86114058b3931c5b4ddc931a8a2cfdc8b085b6 ci: Use pyenv's `python-build` to install Python in lint task (Hennadii Stepanov) Pull request description: This PR: - is an alternative to bitcoin/bitcoin#26581 and bitcoin/bitcoin#26637 - closes bitcoin/bitcoin#26548 Key advantages of this PR over others: - it uses pyenv's `python-build` [standalone](https://github.com/pyenv/pyenv/tree/master/plugins/python-build#using-python-build-standalone) - requires no additional computational resources Note for testing. The lint task must success regardless of whether the `python_cache` is populated or invalidated. ACKs for top commit: MarcoFalke: ACK 123043e99cf3aab9eef7e381b133477b518ac4d0 fanquake: ACK 123043e99cf3aab9eef7e381b133477b518ac4d0 Tree-SHA512: ba0fcdd4f2939a59692b173dcd1f5704444cfcfbb8111538c6f8160056d0536bba250e4f9b0f8c66f8b454e52034bf36ffe6afae76cdc0f7cc5b58b576d790ba
2023-01-16ci: Bump lint task image to Ubuntu JammyHennadii Stepanov
2023-01-16ci: Use pyenv's `python-build` to install Python in lint taskHennadii Stepanov
2023-01-04Merge bitcoin/bitcoin#26791: ci: Properly set COMMIT_RANGE in lint taskMarcoFalke
fa5cbf2290dab08296cabbd973e9adefc883f3fc ci: Properly set COMMIT_RANGE in lint task (MarcoFalke) Pull request description: Currently the variable holds (apart from the commits in the pull request) all commits to master since the pull was opened. This is problematic, because already merged commits are linted in unrelated pulls, leading to: * Wasted resources. For example, currently the lint task may take 9 minutes, when it should take 1. See https://cirrus-ci.com/task/6032782770569216?logs=lint#L1449 * False failures. For example, when a "wrong" commit is in master it can lead to some pulls failing unrelatedly, and others not. Now that the CI has the `/merge` commit (since commit fad7281d7842f337932cf44e703fdd631230ddd6), `COMMIT_RANGE` can simply be set to `HEAD~..HEAD` to only hold the changes in the pull. ACKs for top commit: fanquake: ACK fa5cbf2290dab08296cabbd973e9adefc883f3fc Tree-SHA512: e85fca4ca9d2615ddd2544403485e06885769a3f70bca297e23eefda2a1d28f47c5271f6adfa6ce0e5e972335c78098b76e0db4b109f59d0986bf508cef7528f
2023-01-03script: update python linter dependenciesJon Atack
2023-01-02ci: Properly set COMMIT_RANGE in lint taskMarcoFalke
2022-12-24scripted-diff: Bump copyright headersHennadii Stepanov
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT- Commits of previous years: - 2021: f47dda2c58b5d8d623e0e7ff4e74bc352dfa83d7 - 2020: fa0074e2d82928016a43ca408717154a1c70a4db - 2019: aaaaad6ac95b402fe18d019d67897ced6b316ee0
2022-11-28Merge bitcoin/bitcoin#26588: ci: Skip COMMIT_RANGE if no CIRRUS_PRMarcoFalke
fad1c55301b9f2d091d3b0d8a75ff522ce8dae5a lint: Skip COMMIT_RANGE if no CIRRUS_PR (MarcoFalke) Pull request description: It doesn't make sense to run this for non-PRs, because: * There are known whitespace "violations" in previous commits, so the lint may fail * Once the changes are merged, it is too late to fix them up (force pushes are illegal) * It isn't possible to determine which commits to run on if there is no reference branch (target branch of the pull request) Moreover, the test fails on non-master: * https://github.com/bitcoin/bitcoin/runs/8664441400 Fix all issues by skipping it. ACKs for top commit: hebasto: ACK fad1c55301b9f2d091d3b0d8a75ff522ce8dae5a, also tested in my personal Cirrus account. Tree-SHA512: be15f00e2b2a9069583833545883e0e5968a33d2455dad59e6fb47c1102b4dd16ef932e9ba945e29e9d941e6c17bd531a02c66b0491097801be6bda476875537
2022-11-28lint: Skip COMMIT_RANGE if no CIRRUS_PRMarcoFalke
2022-10-05Remove clang-format from lint taskMacroFake
clang-format could be used in scripted diffs, but remained largely unused.
2022-10-04ci: Move `git config` commands into script where they are usedHennadii Stepanov
2022-09-28ci: Use git2.34 for lint taskMacroFake
2022-09-15Bump codespell version to 2.2.1Jon Atack
2022-06-15refactor: cleanups post unsubtree'ing univaluefanquake
Mostly changes to remove src/univalue exceptions from the various linters, and the required code changes to make them happy. As well as minor doc changes.
2022-06-07test: rename lint-all.py to all-lint.pyMartin Leitner-Ankerl
That way it is impossible for the script to call itself.
2022-04-26Converting `lint-all.sh` to `lint-all.py`.hiago
Converting `lint-all.sh` to `lint-all.py`.
2022-04-07lint: mypy 0.942fanquake
2022-04-07lint: flake8 4.0.1fanquake
2022-04-07lint: codespell 2.1.0fanquake
2021-12-30scripted-diff: Bump copyright headersHennadii Stepanov
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT- Commits of previous years: * 2020: fa0074e2d82928016a43ca408717154a1c70a4db * 2019: aaaaad6ac95b402fe18d019d67897ced6b316ee0
2021-11-30test: Bump shellcheck version to 0.8.0Hennadii Stepanov
2021-11-13test: Enable SC2046 shellcheck ruleHennadii Stepanov
2021-11-12Merge bitcoin/bitcoin#23114: Add minisketch subtree and integrate into ↵fanquake
build/test 29173d6c6ca0cc3be9fa6bf2409a509ffea1a02a ubsan: add minisketch exceptions (Cory Fields) 54b5e1aeab73953c1f12ec2c041572038f6f59da Add thin Minisketch wrapper to pick best implementation (Pieter Wuille) ee9dc71c1bc16205494f2a0aebe575a3c062ff52 Add basic minisketch tests (Pieter Wuille) 0659f12b131fc5915fe7a493306af197f4fb838b Add minisketch dependency (Gleb Naumenko) 0eb7928ab8d9dcb840e4965bfa81deb752b00dfa Add MSVC build configuration for libminisketch (Pieter Wuille) 8bc166d5b179205fc56855e2b462aa273a6f8661 build: add minisketch build file and include it (Cory Fields) b2904ceb85b4d440b1f4bbd716fcb601411cc2c9 build: add configure checks for minisketch (Cory Fields) b6487dc4ef47ec9ea894eceac25f37d0b806f8aa Squashed 'src/minisketch/' content from commit 89629eb2c7 (fanquake) Pull request description: This takes over #21859, which has [recently switched](https://github.com/bitcoin/bitcoin/pull/21859#issuecomment-921899200) to my integration branch. A few more build issues came up (and have been fixed) since, and after discussing with sipa it was decided I would open a PR to shepherd any final changes through. > This adds a `src/minisketch` subtree, taken from the master branch of https://github.com/sipa/minisketch, to prepare for Erlay implementation (see #21515). It gets configured for just supporting 32-bit fields (the only ones we're interested in in the context of Erlay), and some code on top is added: > * A very basic unit test (just to make sure compilation & running works; actual correctness checking is done through minisketch's own tests). > * A wrapper in `minisketchwrapper.{cpp,h}` that runs a benchmark to determine which field implementation to use. Only changes since my last update to the branch in the previous PR have been rebasing on master and fixing an issue with a header in an introduced file. ACKs for top commit: naumenkogs: ACK 29173d6c6ca0cc3be9fa6bf2409a509ffea1a02a Tree-SHA512: 1217d3228db1dd0de12c2919314e1c3626c18a416cf6291fec99d37e34fb6eec8e28d9e9fb935f8590273b8836cbadac313a15f05b4fd9f9d3024c8ce2c80d02
2021-11-07ci: Do not print `git log` for empty COMMIT_RANGEHennadii Stepanov
2021-10-21Add minisketch dependencyGleb Naumenko
2021-10-16lint mypy 0.910fanquake
2021-10-16lint: install pyzmq (22.3.0) into linter environmentjosibake
mypy stubs were introduced in 21.0.1
2021-09-02test: Update test README and lint scriptMarcoFalke
2021-08-26ci: Re-enable verify-commits.py checkMarcoFalke
2021-08-17contrib: use hkps://keys.openpgp.org to retrieve builder keysfanquake
hkps://hkps.pool.sks-keyservers.net is essentially no-longer functional, and a number of distributions and GPG tools have since switched to using this key server as their default. See this Debian patch for additional context: https://salsa.debian.org/debian/gnupg2/-/blob/debian/main/debian/patches/Use-hkps-keys.openpgp.org-as-the-default-keyserver.patch Switch to using keys.openpgp.org in the CI as well.
2021-04-22test: Bump shellcheck versionHennadii Stepanov