diff --git a/CHANGELOG.md b/CHANGELOG.md index c681581e..1508c64c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ - Fixed unexpected avoid_unnecessary_type_assertions - Added `excludeNames` param for `function_lines_of_code` lint - Improved `avoid_unrelated_type_assertions` to support true and false results +- Set default `cyclomatic_complexity` to 10 (https://github.com/solid-software/solid_lints/issues/146) + Credits: Arthur Miranda (https://github.com/arthurbcd) ## 0.1.4 diff --git a/lib/src/lints/cyclomatic_complexity/models/cyclomatic_complexity_parameters.dart b/lib/src/lints/cyclomatic_complexity/models/cyclomatic_complexity_parameters.dart index ea62870d..3ffa5ae1 100644 --- a/lib/src/lints/cyclomatic_complexity/models/cyclomatic_complexity_parameters.dart +++ b/lib/src/lints/cyclomatic_complexity/models/cyclomatic_complexity_parameters.dart @@ -3,7 +3,8 @@ class CyclomaticComplexityParameters { /// Threshold cyclomatic complexity level, exceeding it triggers a warning. final int maxComplexity; - static const _defaultMaxComplexity = 2; + /// Reference: NIST 500-235 item 2.5 + static const _defaultMaxComplexity = 10; /// Constructor for [CyclomaticComplexityParameters] model const CyclomaticComplexityParameters({