Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Bonsai-lint – A multi-language cognitive complexity linter (github.com/ryckakas)
1 point by ryckakas 11 days ago | hide | past | favorite | 1 comment
 help



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.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: