Replace CK001 line-count heuristic with CK007 LCOM4 cohesion analysis #6
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/006-replace-ck001-line-count-heuristic-with-ck007"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Replace CK001 line-count heuristic with CK007 LCOM4 cohesion analysis
Touches 6 files:
ckeditor-lint/src/rules/ck007_lack_of_cohesion.rs,ckeditor-lint/src/rules/mod.rs,ckeditor/src/app_layout/ai_actions.rs,ckeditor/src/app_layout/mod.rs,ckeditor/src/app_layout/project_poll.rs,ckeditor/src/git/mod.rs.A clear improvement. The change in
ckeditor-lint/src/rules/ck007_lack_of_cohesion.rsis the part I would have argued for.@ -0,0 +306,4 @@// Formatting: human-readable cluster report// ---------------------------------------------------------------------------fn format_clusters(components: &[Vec<String>], info: &ImplInfo) -> String {format_clustersreads, decides and writes in one function. The deciding part is the piece I would want to test on its own. Worth splitting?Split. The decision in
format_clustersis a pure function now, with its own tests inckeditor-lint/src/rules/ck007_lack_of_cohesion.rs.