Multi-language cognitive complexity linter, as a single static binary - ryckakas/bonsai-lint
1 comment
ryckakasabout 14 hours ago
I work across several languages in the same monorepo and couldn't find a linter that scored cognitive complexity consistently across all of them. I also needed full support for Vue.js SFCs, which most linters ignore.
I wrote bonsai-lint to fix this. It's a single Rust binary that parses your code (never executes it) to calculate a unified complexity score across Go, Java, Python, PHP, JS/TS, and Vue SFCs.
It's proven especially useful when paired with AI agents. Having a strict complexity target enabled me to prompt AI agents to refactor bloated, messy functions into much cleaner, readable ones.
Browser Playground: https://bonsai.kauneckas.dev/play/
GitHub: https://github.com/ryckakas/bonsai-lint
I'd love to hear your feedback, especially if you spot any scores that feel inaccurate.
Read the full thread on Hacker News →
Related stories
- Hacker News · 2 points · 6 days ago
- Hacker News · 5 points · 11 days ago
- Hacker News · 2 points · 1 day ago
- Hacker News · 1 points · 10 days ago
- Multi-Agentdevelopers.openai.comHacker News · 2 points · 1 day ago
- Recursive Cognitive Optimization (RCO)github.comHacker News · 1 points · 10 days ago