Skip to main content Module cyclomatic_complexity Copy item path Source use super::CyclomaticComplexity ; π use crate::linter::LateLintPass ; π use crate::linter::LintContext ; π use crate::sol::Severity ; π use crate::sol::SolLint ; π use solar::sema::Gcx; π use solar::sema::hir; π use solar::sema::hir::Expr; π use solar::sema::hir::ExprKind; π use solar::sema::hir::Hir; π use solar::sema::hir::Stmt; π use solar::sema::hir::StmtKind; π use solar::sema::hir::Visit; π use std::convert::Infallible ; π use std::ops::ControlFlow ; π DecisionCounter π Counts the decision points of a function body. For a structured program the cyclomatic
complexity E - N + 2P of the control-flow graph equals one plus the number of decision
points, so no graph needs building. MAX_COMPLEXITY π The threshold Slitherβs detector of the same name uses: a function reports when its
complexity is strictly above this value. CYCLOMATIC_COMPLEXITY