ci: Enable ruff ambiguous-unicode-character checks#35277
Merged
Hidden character warning
The head ref may contain hidden characters: "2605-emoji-backdoor-\ud83e\udd72"
Conversation
Contributor
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code Coverage & BenchmarksFor details see: https://corecheck.dev/bitcoin/bitcoin/pulls/35277. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please copy-paste |
e56db3e to
fa9b01a
Compare
Member
|
Concept ACK |
willcl-ark
approved these changes
May 13, 2026
Member
willcl-ark
left a comment
There was a problem hiding this comment.
ACK fa9b01a
Makes sense to disallow these.
This refactor makes the ruff.toml easier to read, because it lists the ignored checks instead of having to enumerate all checks to select in a large collection of rules.
Member
Author
|
Sorry, pushed a small refactor, which I think makes sense, but isn't worth to create a separate pull for. Let me know if I should drop it, though. |
willcl-ark
approved these changes
May 13, 2026
Member
willcl-ark
left a comment
There was a problem hiding this comment.
ACK fa9c919
Only a ruleset tidy up added since last ACK.
rustaceanrob
pushed a commit
to 2140-dev/bitcoin
that referenced
this pull request
May 13, 2026
fa9c919 refactor: Use ignore-list over verbose select-list (MarcoFalke) fa9b01a ci: Enable ruff ambiguous-unicode-character checks (MarcoFalke) Pull request description: Ambiguous unicode chars are unused and confusing. Worst, they can lead to bugs. So enable the ruff checks to catch them. Can be tested via: ``` echo 'ZGlmZiAtLWdpdCBhL3Rlc3QvZnVuY3Rpb25hbC93YWxsZXRfZGlzYWJsZS5weSBiL3Rlc3QvZnVu Y3Rpb25hbC93YWxsZXRfZGlzYWJsZS5weQppbmRleCBkYmNjY2Q0Li4wYjhjNDQ2IDEwMDc1NQot LS0gYS90ZXN0L2Z1bmN0aW9uYWwvd2FsbGV0X2Rpc2FibGUucHkKKysrIGIvdGVzdC9mdW5jdGlv bmFsL3dhbGxldF9kaXNhYmxlLnB5CkBAIC0yMSwzICsyMSw4IEBAIGNsYXNzIERpc2FibGVXYWxs ZXRUZXN0IChCaXRjb2luVGVzdEZyYW1ld29yayk6CiAgICAgZGVmIHJ1bl90ZXN0IChzZWxmKToK KyAgICAgICAgIiIiQSBsb3ZlbHkgZG9jc3RyaW5nICh3aXRoIGEgYFUrRkYwOWAgcGFyZW50aGVz aXPvvIkuIiIiCiAgICAgICAgICMgTWFrZSBzdXJlIHdhbGxldCBpcyByZWFsbHkgZGlzYWJsZWQK KyAgICAgICAgIyBu0L5xYSAgIzwtIGlzIEN5cmlsbGljIChgVSswNDNFYCkKKyAgICAgICAgcHJp bnQoIs6XZWxsbywgd29ybGQhIikgICMgPC0gaXMgdGhlIEdyZWVrIGV0YSAoYFUrMDM5N2ApLgor ICAgICAgICBleGFtcGxlID0gInjigI8iICogMTAwICAjICAgICLigI94IiBpcyBhc3NpZ25lZAor ICAgICAgICBleGFtcGxlPU5vbmUjbm9xYQogICAgICAgICBhc3NlcnRfcmFpc2VzX3JwY19lcnJv cigtMzI2MDEsICdNZXRob2Qgbm90IGZvdW5kJywgc2VsZi5ub2Rlc1swXS5nZXR3YWxsZXRpbmZv KQo=' | base64 --decode | git apply git diff ruff check ./test/functional/*.py ``` It should print 4 error types. ACKs for top commit: stickies-v: ACK fa9c919 willcl-ark: ACK fa9c919 Tree-SHA512: de226ec2feaf65a0a8b15606708cc390296be4492f41221f8a49f034b16e8fb62125342c6993f9d5c76bd4ae2db7343851b252a1b9140e27d6777f19a0b1605e (cherry picked from commit 82733e6)
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ambiguous unicode chars are unused and confusing. Worst, they can lead to bugs.
So enable the ruff checks to catch them. Can be tested via:
It should print 4 error types.