Skip to content

Commit 6ad014f

Browse files
Disable cyclomatic complexity metric for tests (#9)
* Disable cyclomatic complexity metric for tests * Update CHANGELOG.md * Set version to 0.0.9
1 parent e1acb39 commit 6ad014f

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.0.9
2+
3+
- Disable cyclomatic complexity metric for tests
4+
15
## 0.0.8
26

37
- Exclude generated files

lib/analysis_options_test.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ dart_code_metrics:
1111
# Both options didn't look right, so we decided that tests are ok to be long.
1212
source-lines-of-code: false
1313

14+
# Since we're not using the source-lines-of-code rule, `main()` function in test can
15+
# have high cyclomatic complexity.
16+
# For rationale against splitting up `main()` in tests, see `source-lines-of-code` comments.
17+
cyclomatic-complexity: false
18+
1419
rules:
1520

1621
# Late keyword is allowed in tests in order to enable the use of custom mocks and

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: solid_lints
22
description: Lints for Dart and Flutter based on software industry standards and best practices.
3-
version: 0.0.8
3+
version: 0.0.9
44
homepage: https://github.com/solid-software/solid_lints/
55

66
environment:

0 commit comments

Comments
 (0)