Skip to content

ci: Enable ruff ambiguous-unicode-character checks#35277

Merged
fanquake merged 2 commits into
bitcoin:masterfrom
maflcko:2605-emoji-backdoor-🥲
May 13, 2026

Hidden character warning

The head ref may contain hidden characters: "2605-emoji-backdoor-\ud83e\udd72"
Merged

ci: Enable ruff ambiguous-unicode-character checks#35277
fanquake merged 2 commits into
bitcoin:masterfrom
maflcko:2605-emoji-backdoor-🥲

Conversation

@maflcko
Copy link
Copy Markdown
Member

@maflcko maflcko commented May 13, 2026

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.

@DrahtBot DrahtBot changed the title ci: Enable ruff ambiguous-unicode-character checks ci: Enable ruff ambiguous-unicode-character checks May 13, 2026
@DrahtBot DrahtBot added the Tests label May 13, 2026
@DrahtBot
Copy link
Copy Markdown
Contributor

DrahtBot commented May 13, 2026

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage & Benchmarks

For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/35277.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK stickies-v, willcl-ark
Concept ACK fanquake

If your review is incorrectly listed, please copy-paste <!--meta-tag:bot-skip--> into the comment that the bot should ignore.

@maflcko maflcko force-pushed the 2605-emoji-backdoor- branch from e56db3e to fa9b01a Compare May 13, 2026 08:33
@fanquake
Copy link
Copy Markdown
Member

Concept ACK

@fanquake fanquake requested a review from willcl-ark May 13, 2026 09:28
Copy link
Copy Markdown
Member

@willcl-ark willcl-ark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK fa9b01a

Makes sense to disallow these.

@DrahtBot DrahtBot requested a review from fanquake May 13, 2026 10:11
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.
@maflcko
Copy link
Copy Markdown
Member Author

maflcko commented May 13, 2026

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.

Copy link
Copy Markdown
Contributor

@stickies-v stickies-v left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK fa9c919

@DrahtBot DrahtBot requested a review from willcl-ark May 13, 2026 10:40
Copy link
Copy Markdown
Member

@willcl-ark willcl-ark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK fa9c919

Only a ruleset tidy up added since last ACK.

@fanquake fanquake merged commit 82733e6 into bitcoin:master May 13, 2026
27 checks passed
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)
@maflcko maflcko deleted the 2605-emoji-backdoor-🥲 branch May 13, 2026 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants