Age | Commit message (Collapse) | Author |
|
These are unreferenced in the CI and documentation, and have been since
2019 (see #17549).
I'm not sure the cppcheck is worthwhile. It takes a long time
to run (I think this is why it isn't in the normal lints), and right
now it only appears to find implicit constructors. The list of
exceptions is out of date. But if anyone wants to bring it back at any
time in the future they can do so from git history (and port it to Python).
|
|
bd6ceb4049602aa556a93a0ac8954802dc0bf456 test: port 'lint-shell.sh' to python (whiteh0rse)
Pull request description:
Converts `test/lint/lint-shell.sh` to Python and updates the docs accordingly. In order for the linter to run, it requires `git` and the `shellcheck` linter to be installed on the system. The script will fail gracefully with a help message if `shellcheck` is not installed.
Top commit has no ACKs.
Tree-SHA512: edc3f1af582b736a0b46f32bd7448e859201dc43f5dd086f16aab49037a1ab936f5376c29fc1006a932b9e98b4f2423d83d98e9666304781a06eb4d2a16f54e3
|
|
|
|
e3a06a3c6cbb288ac89a2725cf71ae8adaebf35c test: Add `strerror` to locale-dependence linter (laanwj)
f00fb1265a8bc26e1612c771173325dbe49b3612 util: Increase buffer size to 1024 in SysErrorString (laanwj)
718da302c7b11b375042c3000d421fd93348c199 util: Refactor SysErrorString logic (laanwj)
e7f2f77756d33c6be9c8998a575b263ff2d39270 util: Use strerror_s for SysErrorString on Windows (laanwj)
46971c6dbfbc39ebbc74ab1ed8c00edc12859373 util: Replace non-threadsafe strerror (laanwj)
Pull request description:
Some uses of non-threadsafe `strerror` have snuck into the code since they were removed in #4152. Add a wrapper `SysErrorString` for thread-safe strerror alternatives (with code from `NetworkErrorString`) and replace all uses of `strerror` with this.
Edit: I've also added a commit that refactors the code so that buf[] is never read at all if the function fails, making some fragile-looking code unnecessary.
Edit2: from the linux manpage:
```
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
┌───────────────────┬───────────────┬─────────────────────────┐
│Interface │ Attribute │ Value │
├───────────────────┼───────────────┼─────────────────────────┤
│strerror() │ Thread safety │ MT-Unsafe race:strerror │
├───────────────────┼───────────────┼─────────────────────────┤
…
├───────────────────┼───────────────┼─────────────────────────┤
│strerror_r(), │ Thread safety │ MT-Safe │
│strerror_l() │ │ │
└───────────────────┴───────────────┴─────────────────────────┘
```
As the function can be called from any thread at any time, using a non-thread-safe function is unacceptable.
ACKs for top commit:
jonatack:
ACK e3a06a3c6cbb288ac89a2725cf71ae8adaebf35c
Tree-SHA512: 20e71ebb9e979d4e1d8cafbb2e32e20c2a63f09115fe72cdde67c8f80ae98c531d286f935fd8a6e92a18b72607d7bd3e846b2d871d9691a6036b0676de8aaf25
|
|
Also removes boost/algorithm/string.hpp from expected includes
|
|
Note that `SplitString` doesn't support token compression, but in this case
it does not matter as empty strings are already skipped anyways.
Also removes split.hpp and classification.hpp from expected includes
|
|
|
|
lint-assertions.py
fa82a1ed833fd749849fa19267207b63e338d84d lint: Mention NONFATAL_UNREACHABLE in lint-assertions.py (MacroFake)
Pull request description:
Follow up to commit b1c5991eebb916755be188f355ad36fe01a3f529. Also remove empty newline added in that commit.
ACKs for top commit:
fanquake:
ACK fa82a1ed833fd749849fa19267207b63e338d84d
Tree-SHA512: cf398eceb135672137183bfa19ee57a82553a3dbcbce74db954c6fcd79f9606092cc0d8217610fe6cd67b7ef2d4f01d90329f0f568516d9b14aa2cd0f0715478
|
|
Avoid the use of shell=True.
|
|
29f44fed36f45cb827c5e593ce52682a942bc296 Converting `lint-all.sh` to `lint-all.py`. (hiago)
Pull request description:
This PR is converting `test/lint/lint-all.sh` to `test/lint/lint-assertions.py`. It's an item of https://github.com/bitcoin/bitcoin/issues/24783.
ACKs for top commit:
laanwj:
Tested ACK 29f44fed36f45cb827c5e593ce52682a942bc296
Tree-SHA512: 5427936aaa8e009613048448cbd79d9225675bdcadcf4fbb70fd091e0aab85e350ef1678da1b388f70d62ca16f40409409f90da3f6bbf057480522cd50fde811
|
|
Add `strerror` to the locale-dependence linter to catch its use. Add
exemptions for bdb interface code (false positive) and strerror.cpp
(the only allowed use).
Also fix a bug in the regexp so that `_r` and `_s` variants are detected
again.
|
|
Converting `lint-all.sh` to `lint-all.py`.
|
|
|
|
Prior to this change blocks could be pruned up to the last block before the blockfilterindex current best block.
|
|
lint-assertions.py
172c2333f03aecb4c347c791537e13c296adbde2 Porting lint-assertions.sh to lint-assertions.py (hiago)
Pull request description:
This PR is converting `test/lint/lint-assertions.sh` to `test/lint/lint-assertions.py`. It's an item of #24783.
ACKs for top commit:
laanwj:
Tested ACK 172c2333f03aecb4c347c791537e13c296adbde2
Tree-SHA512: 94d5b03acfeaf2303fad95d489d6c3aa7bd655889ddaa807cc97e0613b8eb8f5ef094feee2a98d974606890deb554e76490a5c523d64eb5bc55afa6a43221aae
|
|
Python
79635c79e0533aa7f2e2440515ad766f965343ba lint: Convert lint-circular-dependencies.sh to Python (Smlep)
Pull request description:
Here is a port of `/test/lint/lint-circular-dependencies.sh` to a Python-script as part of the request of https://github.com/bitcoin/bitcoin/issues/24783.
It aims to provide the same output as the bash version.
ACKs for top commit:
laanwj:
Tested ACK 79635c79e0533aa7f2e2440515ad766f965343ba
Tree-SHA512: f18077018f1229dd933cfe2bf0cfe7dc7d6538961c96a83c7a1f05e0cec4b068ca05502d68410d2aa4b6864523424db386e38233735190525904c2a8e9d2ba13
|
|
ae0e06a439e09a7e24dd6198591a588c8df2d529 Converted lint-tests.sh to python (TakeshiMusgrave)
Pull request description:
Reference issue: https://github.com/bitcoin/bitcoin/issues/24783
ACKs for top commit:
laanwj:
Tested ACK ae0e06a439e09a7e24dd6198591a588c8df2d529
Tree-SHA512: a118295b5b6b5199b52d46b54de871d88dd544112e7dd5001a9575d65b093af0aea390f9ad223462a4fc6a201bd8c4debe5e26bfa4860a90c97cfe300477c04a
|
|
267684ee34d795e4f762c4949fa45d99fe74dde3 lint: convert format strings linter test to python (Eunoia)
Pull request description:
Refs #24783
Attempted to keep the style and flow of implementation as it is.
### Additional Notes(Optional):
1. There is scope of improvement on how the related files are fetched. In this `git grep` with `subprocess` is still used as I found it to be the simplest. Any pointers on this are appreciated.
2. Removed sort operation on the matching files as I couldn't think of any strong arguments to have it. Any pointers on this are appreciated.
3. Not important, but one small detail is that the previous implementation was storing matched files for all the `function_names` iterated so far. Fixed that in this PR.
ACKs for top commit:
laanwj:
Code review ACK 267684ee34d795e4f762c4949fa45d99fe74dde3
Tree-SHA512: 54ceae0c3501e561fdd9c5167b2dd8dd06da1b3697a077a042210970ce7004bda8c4e19abb1905ee64cbdce635f0a078508da645846ae7e81c016091f3f02458
|
|
2c838cc309b2e3e1e30344178c17f789381a8b6b lint: convert shell locale linter test to Python (Eunoia)
Pull request description:
Refs #24783
ACKs for top commit:
laanwj:
Code review ACK 2c838cc309b2e3e1e30344178c17f789381a8b6b
Tree-SHA512: 3cb5e7c7cd2acbdf0dc45096055b33cbfa0ec9e47ea567452d23a49a7441b3b62a8416879f234459c86fa892c42205c91d8a575115346c023ab0152cf713e20c
|
|
d5fdec5cf8cffe8ece5460cd8c6e83ea6eebf625 Convert lint-include-guards.sh to python (brydinh)
Pull request description:
This PR addresses [issue 24783](https://github.com/bitcoin/bitcoin/issues/24783). Converted lint-include-guards.sh to python.
ACKs for top commit:
KevinMusgrave:
Tested ACK d5fdec5cf8cffe8ece5460cd8c6e83ea6eebf625
laanwj:
Code review ACK d5fdec5cf8cffe8ece5460cd8c6e83ea6eebf625
Tree-SHA512: cae566fc1b222b447c0d60ea20fd012f1cfde4dd07c1762ede2b2c9f84ed59ee8e629db1264dab8ac20bcac410e4c389827addf0a59757f94b40a65ea9bab466
|
|
Python
035eef4be6071a060260907001363a0d12f1f2d2 lint: Convert lint-python-utf8-encoding.sh to Python (Dimitri)
Pull request description:
A port of `test/lint/lint-python-utf8-encoding.sh` to a Python-script as part of the request of #24783. Checked for output-consistency.
ACKs for top commit:
laanwj:
Code review ACK 035eef4be6071a060260907001363a0d12f1f2d2
Tree-SHA512: a8a2f505bf7953d318837182101346c44e73cfd1bf3b5342ff1400fb1c67c5292519fa99db1035da87cf27fb5f5ac5d28871bf55a1c085b5f8a3bb33ff0fa3fb
|
|
3043a1bc9d32b451020b511c8340c12e0d99f8cc lint: Make known violations more specific in lint-locale-dependence (Dimitri)
229917d3d4798bf60ee2935f31529668bbb53a23 lint: Convert lint-locale-dependence.sh to Python (Dimitri)
Pull request description:
A port of `test/lint/lint-locale-dependence.sh` to a Python-script as part of the request of #24783. Checked for output-consistency.
ACKs for top commit:
laanwj:
Tested and code review ACK 3043a1bc9d32b451020b511c8340c12e0d99f8cc
Tree-SHA512: 80555cf7aac156bab5488f85098731d1c12a42667fe7d0df0c35487ab8fc951654a70a15351a759282eabab8319f5aabd8bdb153412b9edc3a9033bef64fd609
|
|
|
|
|
|
|
|
|
|
4a9e36dbaf96f83d0829f8442114a2fa36641776 lint: convert submodule linter test to Python (Eunoia)
Pull request description:
Refs #24783
ACKs for top commit:
laanwj:
Tested ACK 4a9e36dbaf96f83d0829f8442114a2fa36641776
Tree-SHA512: ca25b59acf75cebc79588a6c51dc5c313c8d0bd1d492127815d7b81b36aaffd02815a515d97b355582002f71efc33d46435d0b28fce24497bb99799d9ba57228
|
|
|
|
|
|
Specify encoding when reading header files, add docstring
Update test/lint/lint-include-guards.py include guard count logic
Co-authored-by: Kevin Musgrave <tkm45@cornell.edu>
Update test/lint/lint-include-guards.py by removing whitespace
|
|
67b41678c8284715c9cf96d6bdbde9a072b7a904 lint: Convert lint-includes.sh to Python (Dimitri)
Pull request description:
A port of `test/lint/lint-includes.sh` to a Python-script as part of the request of #24783. Checked for output-consistency.
ACKs for top commit:
KevinMusgrave:
Tested ACK 67b41678c8284715c9cf96d6bdbde9a072b7a904
Tree-SHA512: 05b4b114dc101e571004aee8aea1480e4dda1dc645426100649e9cb81e56e8667f88d6d5646a9860ea1c7abc36754eda2a77ec10156c54b62db00e2c00b8ceae
|
|
|
|
|
|
47b66ac4acd148da9fd0d894574f8bb3b3b33368 lint: Convert Python linter to Python (Fabian Jahr)
Pull request description:
The outputs provided by the Python version should be exactly the same as the ones from the shell version.
There is small improvement here: Previously only the dependency of `flake9` was checked, now all dependencies are checked before running.
I also tried to mostly follow the [recommendations here](https://github.com/bitcoin/bitcoin/pull/24766#pullrequestreview-932953476) but happy to make more changes if there is still room for improvement.
ACKs for top commit:
laanwj:
Tested ACK 47b66ac4acd148da9fd0d894574f8bb3b3b33368
Tree-SHA512: 1630188e176c1063b8905669b76682b361a858cde6990ab17e51ad4333bf376eab796050cdb9f2967b84f1f74379d9e860c4258561b1964e1a47183c593e5bb4
|
|
f27fcd9bf4d667f78055d4b3ee6f426e4c5ffe16 lint: Convert lint-git-commit-check.sh to Python (Dimitri)
Pull request description:
A port of `/test/lint/lint-git-commit-check.sh` to a Python-script as part of the request of #24783 . Checked for output-consistency.
ACKs for top commit:
laanwj:
re-ACK f27fcd9bf4d667f78055d4b3ee6f426e4c5ffe16
Tree-SHA512: afc4a662f4aec1796c023b98a875c1591940ecdfc709eefe2df29d33e51e807c3c2e2b5c410aa3ad1cd3f6f8207f5c15b638637ff9f5659cafa7543bbe8a0bae
|
|
a75f6d86d1bd21a79cbbe141274f04aa4365985e lint: Convert lint-whitespace.sh to Python (Dimitri)
Pull request description:
A port of `/test/lint/lint-whitespace.sh` to a Python-script as part of the request of #24783 . Checked for output-consistency.
ACKs for top commit:
laanwj:
Code review and tested ACK a75f6d86d1bd21a79cbbe141274f04aa4365985e
Tree-SHA512: 982041b0beb1b3866493ad523950c9a536a8b1ec79b773fe86dbc1166844c13a30b384e92025f845d45d25334f90f3abda5fa23f0f28e7c2cddc5e496f84c445
|
|
|
|
|
|
|
|
Use raw string
Use re.search instead of grep in check_matching_test_names
Replaced bash commands in check_unique_test_names with python commands
Use set and sort output
Use set comprehension
Use .splitlines()
Call grep_boost_fixture_test_suite once
splitlines() once
Fixed copyright date
Use check_output() instead of run()
add encoding='utf8'
Use clearer code for getting duplicates
|
|
|
|
Change permission
Change argument so that it's compatiable with python 3.6
Change comment to docstring
Remove .split, .append, .extend calls. Remove 'output' variable assignment
|
|
I think we are past the point where we need to lint for this, the CPU
can probably be better utilized.
|
|
I don't think we need to maintain a linter for reintroducing boost::bind
at this point.
|
|
4685463301a1c64c1be07725059cc94d69db104b doc: Update lint test docs (Fabian Jahr)
77f98df41f032d6846f8309c0b1f239e9dbc0da3 lint: convert spell check lint test to python (Fabian Jahr)
Pull request description:
The new python version should produce the exact same output as the bash version but be easier to maintain.
ACKs for top commit:
MarcoFalke:
cr ACK 4685463301a1c64c1be07725059cc94d69db104b
Tree-SHA512: 242b802b750b42b299b93d1de4bcf17d92ad0a633d31894145d8590782a1db1041de59a283f133a4f75898d95444eb3c842005a6aa5cb919543625addad596d8
|
|
|
|
|
|
|
|
|
|
This is needed for the next commit
|