From 257e539445404c34fda62877e84f837a826fac36 Mon Sep 17 00:00:00 2001 From: Justin Oeni Date: Thu, 24 Oct 2024 12:35:34 -0400 Subject: [PATCH] Integrated Complexity-Report into our git flow as a static analysis tool --- .complexrc | 8 ++++++++ complexity_report.md | 29 +++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 .complexrc create mode 100644 complexity_report.md diff --git a/.complexrc b/.complexrc new file mode 100644 index 0000000000..8554da6412 --- /dev/null +++ b/.complexrc @@ -0,0 +1,8 @@ +{ + "output": "complexity_report.md", + "format": "markdown", + "allfiles": false, + "ignoreerrors": true, + "filepattern": "\\.js$", + "dirpattern": "(src)" +} \ No newline at end of file diff --git a/complexity_report.md b/complexity_report.md new file mode 100644 index 0000000000..c4a4f143fc --- /dev/null +++ b/complexity_report.md @@ -0,0 +1,29 @@ +Mean per-function logical LOC: 18 +Mean per-function parameter count: 3 +Mean per-function cyclomatic complexity: 1 +Mean per-function Halstead effort: 10734.042662663262 +Mean per-module maintainability index: 92.43435721883823 +First-order density: 0% +Change cost: 100% +Core size: 0% + +src/routes/api.js + + Physical LOC: 45 + Logical LOC: 23 + Mean parameter count: 3 + Cyclomatic complexity: 1 + Cyclomatic complexity density: 4.3478260869565215% + Maintainability index: 92.43435721883823 + Dependency count: 4 + + Function: module.exports + Line No.: 8 + Physical LOC: 38 + Logical LOC: 18 + Parameter count: 3 + Cyclomatic complexity: 1 + Cyclomatic complexity density: 5.555555555555555% + Halstead difficulty: 6.411290322580645 + Halstead volume: 1674.2406165663451 + Halstead effort: 10734.042662663262 \ No newline at end of file