Skip to content

Commit

Permalink
Change default value of cyclomatic_complexity rule to 10.
Browse files Browse the repository at this point in the history
  • Loading branch information
illia-romanenko committed Mar 26, 2024
1 parent 67d85b3 commit 7f08163
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit 7f08163

Please sign in to comment.