Rule for cohesion (LCOM4 or similar)
Open
needs-decision
rule
- Dominant language
- Rust
- Stars
- 49.7k
- Forks
- 2.4k
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 458
Description
### Summary
Hi! 👋
I was looking at rules that measure cohesion in ruff, and I did not find much.
There is this library https://github.com/mschwager/cohesion, which can work as a flake8 plugin, with a rule (`H601 class has low cohesion`).
Any plans to implement something similar? Or maybe something like this already exists in ruff and I missed it?
Thanks!
Contributor guide
Research direction
Start by reviewing Ruff's existing rule set and the linked cohesion library, especially its H601 flake8 rule. Determine whether a cohesion rule belongs in Ruff and define the intended LCOM4 or similar metric, supported Python constructs, diagnostics, and tests before implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100