Skip to content

Commit 90c8286

Browse files
committed
perf(linter): detect node types from let..else statements (#13690)
- part of #12223 Adds basic detection for syntax like `let AstKind::Something(...) = node.kind() else { return };` in lint rules for generating rule runner trait impls. ## Correctness Spot checking it on my laptop shows same number of diagnostics for `kibana` and `vscode`: <img width="640" height="180" alt="Screenshot 2025-09-11 at 5 35 47 PM" src="https://github.com/user-attachments/assets/43eb90a7-c3a9-46ed-8b73-e077a1d8d7f3" /> <img width="632" height="179" alt="Screenshot 2025-09-11 at 5 36 08 PM" src="https://github.com/user-attachments/assets/93652148-e27a-4d8c-9121-307624f2ee27" /> ## Benchmarks ~15% faster on `oven-sh/bun`: <img width="880" height="369" alt="Screenshot 2025-09-11 at 5 26 49 PM" src="https://github.com/user-attachments/assets/69a4c806-003e-4ff0-a679-ab9c6616dfc4" /> ~9% faster on `microsoft/vscode`: <img width="833" height="331" alt="Screenshot 2025-09-11 at 5 27 50 PM" src="https://github.com/user-attachments/assets/a6a42f96-ecab-448e-919c-550e6b4bdc26" /> ~11% faster on `posthog/posthog`: <img width="814" height="323" alt="Screenshot 2025-09-11 at 5 28 23 PM" src="https://github.com/user-attachments/assets/64daac0d-5bff-40df-aee7-ee843ba84351" /> ~8% faster on `elastic/kibana`: <img width="797" height="324" alt="Screenshot 2025-09-11 at 5 31 00 PM" src="https://github.com/user-attachments/assets/3ca57a2b-0e69-4460-903f-baa36de69123" />
1 parent 6b74078 commit 90c8286

File tree

6 files changed

+543
-233
lines changed

6 files changed

+543
-233
lines changed

0 commit comments

Comments
 (0)