Skip to main content

Module cyclomatic_complexity

Module cyclomatic_complexity 

Source

Re-exportsΒ§

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; πŸ”’

StructsΒ§

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.

ConstantsΒ§

MAX_COMPLEXITY πŸ”’
The threshold Slither’s detector of the same name uses: a function reports when its complexity is strictly above this value.

StaticsΒ§

CYCLOMATIC_COMPLEXITY