Skip to content

Commit 7f08163

Browse files
Change default value of cyclomatic_complexity rule to 10.
1 parent 67d85b3 commit 7f08163

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
- Fixed unexpected avoid_unnecessary_type_assertions
1010
- Added `excludeNames` param for `function_lines_of_code` lint
1111
- Improved `avoid_unrelated_type_assertions` to support true and false results
12+
- Set default `cyclomatic_complexity` to 10 (https://github.com/solid-software/solid_lints/issues/146)
13+
Credits: Arthur Miranda (https://github.com/arthurbcd)
1214

1315
## 0.1.4
1416

lib/src/lints/cyclomatic_complexity/models/cyclomatic_complexity_parameters.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ class CyclomaticComplexityParameters {
33
/// Threshold cyclomatic complexity level, exceeding it triggers a warning.
44
final int maxComplexity;
55

6-
static const _defaultMaxComplexity = 2;
6+
/// Reference: NIST 500-235 item 2.5
7+
static const _defaultMaxComplexity = 10;
78

89
/// Constructor for [CyclomaticComplexityParameters] model
910
const CyclomaticComplexityParameters({

0 commit comments

Comments
 (0)