dash/test/lint
pasta 1e9694d0d9
Merge #6085: backport: merge bitcoin#21727, #22371, #21526, #23174, #23785, #23581, #23974, #22932, #24050, #24515 (blockstorage backports)
1bf0bf492f merge bitcoin#24515: Only load BlockMan in BlockMan member functions (Kittywhiskers Van Gogh)
5c1eb67c42 merge bitcoin#24050: Give m_block_index ownership of CBlockIndexes (Kittywhiskers Van Gogh)
c440304c85 merge bitcoin#22932: Add CBlockIndex lock annotations, guard nStatus/nFile/nDataPos/nUndoPos by cs_main (Kittywhiskers Van Gogh)
e303a4ec45 merge bitcoin#23974: Make blockstorage globals private members of BlockManager (Kittywhiskers Van Gogh)
301163c65e merge bitcoin#23581: Move BlockManager to node/blockstorage (Kittywhiskers Van Gogh)
732e871a6b merge bitcoin#23785: Move stuff to ChainstateManager (Kittywhiskers Van Gogh)
b402fd57fa merge bitcoin#23174: have LoadBlockIndex account for snapshot use (Kittywhiskers Van Gogh)
a08f2f48bf merge bitcoin#21526: UpdateTip/CheckBlockIndex assumeutxo support (Kittywhiskers Van Gogh)
472caa048a merge bitcoin#22371: Move pblocktree global to BlockManager (Kittywhiskers Van Gogh)
d69ca833df merge bitcoin#21727: Move more stuff to blockstorage (Kittywhiskers Van Gogh)
6df927fc60 chore: exclude underscore placeholder from shadowing linter warnings (Kittywhiskers Van Gogh)

Pull request description:

  ## Additional Information

  * Dependent on https://github.com/dashpay/dash/pull/6078

  * Dependent on https://github.com/dashpay/dash/pull/6074

  * Dependent on https://github.com/dashpay/dash/pull/6083

  * Dependent on https://github.com/dashpay/dash/pull/6119

  * Dependency for https://github.com/dashpay/dash/pull/6138

  * In [bitcoin#24050](https://github.com/bitcoin/bitcoin/pull/24050), `BlockMap` is given ownership of the `CBlockIndex` instance contained within the `unordered_map`. The same has not been done for `PrevBlockMap` as `PrevBlockMap` is populated with `pprev` pointers and doing so seems to break validation logic.

  * Dash has a specific linter for all Dash-specific code present in Core. The introduction of `util/translation.h` into `validation.h` has caused the linter to trigger shadowing warnings due to a conflict between the common use of `_` as a placeholder/throwaway name ([source](37e026a038/src/spork.cpp (L44))) and upstream's usage of it to process translatable strings ([source](37e026a038/src/util/translation.h (L55-L62))).

    Neither C++17 nor C++20 have an _official_ placeholder/throwaway term or annotation for structured bindings (which cannot use `[[maybe_unused]` or `std::ignore`) but [P2169](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2169r4.pdf) is a proposal put forth to make it the official placeholder, in that light, the linter will silence shadowing warnings involving an underscore.

  ## 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
  - [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 1bf0bf492f (with one nit)
  knst:
    utACK 1bf0bf492f
  PastaPastaPasta:
    utACK 1bf0bf492f

Tree-SHA512: 875fff34fe91916722f017526135697466e521d7179c473a5c0c444e3aa873369019b804dee9f5f795fc7ebed5c2481b5ce2d895b2950782a37de7b098157ad4
2024-07-23 09:30:59 -05:00
..
check-doc.py Merge bitcoin/bitcoin#26717: test: Improve check-doc.py pattern 2024-06-13 10:06:12 -05:00
commit-script-check.sh Merge bitcoin/bitcoin#21749: test: Bump shellcheck version 2024-04-23 22:41:10 +07:00
extended-lint-all.sh Merge #18673: scripted-diff: Sort test includes 2023-08-29 22:00:59 -05:00
extended-lint-cppcheck.sh test: remove exception for util::Ref which doesn't exist more 2024-04-11 02:26:02 +07:00
git-subtree-check.sh Merge #20813: scripted-diff: Bump copyright headers 2024-04-10 03:19:34 +07:00
lint-all.sh Merge bitcoin/bitcoin#24762: lint: Start to use py lint scripts 2024-05-16 02:09:38 +07:00
lint-assertions.py Merge bitcoin/bitcoin#24856: lint: Converting lint-assertions.sh to lint-assertions.py 2024-06-06 22:58:31 -05:00
lint-circular-dependencies.sh refactor: drop usage of chainstate globals in asset locks logic 2024-06-26 13:50:48 +00:00
lint-cppcheck-dash.sh chore: exclude underscore placeholder from shadowing linter warnings 2024-07-19 17:17:47 +00:00
lint-files.py chore: dashify file list exception for liner 2024-05-16 02:10:16 +07:00
lint-format-strings.sh Merge bitcoin/bitcoin#24762: lint: Start to use py lint scripts 2024-05-16 02:09:38 +07:00
lint-git-commit-check.sh Merge #20071: ci, lint: Remove usage of TRAVIS_COMMIT_RANGE 2024-01-27 22:44:49 -06:00
lint-include-guards.sh Merge #20813: scripted-diff: Bump copyright headers 2024-04-10 03:19:34 +07:00
lint-includes.sh qt: drop leftover boost::function usage in Qt, drop header from list 2024-04-23 15:34:48 +00:00
lint-locale-dependence.sh Merge #18673: scripted-diff: Sort test includes 2023-08-29 22:00:59 -05:00
lint-logs.sh Merge #17829: scripted-diff: Bump copyright of files changed in 2019 2023-12-06 11:40:14 -06:00
lint-python-dead-code.sh
lint-python-mutable-default-parameters.py Merge bitcoin/bitcoin#24800: lint: convert lint-python-mutable-default-parameters.sh to Python 2024-01-02 11:17:47 -06:00
lint-python-utf8-encoding.sh Merge #20813: scripted-diff: Bump copyright headers 2024-04-10 03:19:34 +07:00
lint-python.sh Merge #20813: scripted-diff: Bump copyright headers 2024-04-10 03:19:34 +07:00
lint-shell-locale.sh build/depends: commit dashpay/bls-signatures@66ee820f to source tree as vendored (#5077) 2022-11-22 11:34:46 -06:00
lint-shell.sh Merge #20697: ci: Fix COMMIT_RANGE variable value for PRs 2024-03-27 00:48:27 +07:00
lint-spelling.sh Merge bitcoin/bitcoin#24762: lint: Start to use py lint scripts 2024-05-16 02:09:38 +07:00
lint-submodule.py Merge bitcoin/bitcoin#24803: lint: convert submodule linter test to Python 2024-01-13 19:32:31 -06:00
lint-tests.py Merge bitcoin/bitcoin#24815: lint: convert lint-tests.sh to python 2024-01-13 19:32:31 -06:00
lint-whitespace.sh Merge #20813: scripted-diff: Bump copyright headers 2024-04-10 03:19:34 +07:00
README.md Merge #20567: test: Add option to git-subtree-check to do full check, add help 2023-12-06 11:40:14 -06:00
run-lint-format-strings.py Merge bitcoin/bitcoin#24762: lint: Start to use py lint scripts 2024-05-16 02:09:38 +07:00
spelling.ignore-words.txt Merge bitcoin/bitcoin#24762: lint: Start to use py lint scripts 2024-05-16 02:09:38 +07:00

This folder contains lint scripts.

check-doc.py

Check for missing documentation of command line options.

commit-script-check.sh

Verification of scripted diffs. Scripted diffs are only assumed to run on the latest LTS release of Ubuntu. Running them on other operating systems might require installing GNU tools, such as GNU sed.

git-subtree-check.sh

Run this script from the root of the repository to verify that a subtree matches the contents of the commit it claims to have been updated to.

Usage: test/lint/git-subtree-check.sh [-r] DIR [COMMIT]
       test/lint/git-subtree-check.sh -?
  • DIR is the prefix within the repository to check.
  • COMMIT is the commit to check, if it is not provided, HEAD will be used.
  • -r checks that subtree commit is present in repository.

To do a full check with -r, make sure that you have fetched the upstream repository branch in which the subtree is maintained:

To do so, add the upstream repository as remote:

git remote add --fetch secp256k1 https://github.com/bitcoin-core/secp256k1.git

lint-all.sh

Calls other scripts with the lint- prefix.