Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Measure cohesion score #42

Open
simonrenoult opened this issue Nov 13, 2022 · 0 comments
Open

Measure cohesion score #42

simonrenoult opened this issue Nov 13, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@simonrenoult
Copy link
Owner

simonrenoult commented Nov 13, 2022

Context

Cohesion is a core element of software quality. It defines the degree to which the elements of a module belong together (source). Measuring cohesion means measuring how strong relationships between modules are.

Problem

Cohesive piece of code should move and change together. On the contrary, when two unrelated pieces of code move together, it reveals a strong relationship between them, which reveals design weaknesses.

Idea

Since cohesive pieces of code move together, they are likely to be changed within the same commit.
Cohesive pieces of code are located close to each other.
If they are not, we can argue that cohesiveness weakens.

Furthermore, if a commit contains unrelated pieces of code, then we could argue that cohesiveness also weakens.

@simonrenoult simonrenoult added the enhancement New feature or request label Nov 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant