Should the ??
, ??=
, ?.
, ?...
operators consider as new path in the code when calculating the cyclomatic complexity of a method?
Asked
Active
Viewed 83 times
1

nipunasudha
- 2,427
- 2
- 21
- 46
-
1I also question this myself. It seems that [`dart_code_metrics`](https://github.com/dart-code-checker/dart-code-metrics) consider `?.`, `??` and `??=` as a complexity increasing factor. [source](https://github.com/dart-code-checker/dart-code-metrics/blob/master/lib/src/analyzers/lint_analyzer/metrics/metrics_list/cyclomatic_complexity/cyclomatic_complexity_flow_visitor.dart) I don't know, however, any source regarding this subject... – Mateus Felipe May 23 '21 at 19:31