SIGN IN SIGN UP

Clean-up `used_underscore_*` (#17308)

This primarily reorders things to do cheaper checks before more
expensive checks, but there are also some smaller changes:
* No macros are linted instead of only skipping external macros.
* `expect` and `allow` on the item in `used_underscore_items` now work.
`used_undercore_bindings` already did this.
* `is_used` now more closely matches what `unused_variables` does. It
takes very little for a variable to count as used.
* `consts`/`statics` and all type relative paths are checked
* Functions are linted if they're named, not just if they're called.

changelog: [`used_underscore_bindings`]: lint more cases where the
binding is used
changelog: [`used_underscore_items`]: additionally check for `allow` end
`expect` attributes on the item definition.
L
llogiq committed
6369b4965b9a9d53574ce89115612df95a7d3894
Committed by GitHub <noreply@github.com> on 8/16/2026, 3:42:26 PM