Skip to content
This repository was archived by the owner on Jul 16, 2023. It is now read-only.
This repository was archived by the owner on Jul 16, 2023. It is now read-only.

[BUG] --fatal-warnings is not working #1193

Closed
@kefasjw

Description

@kefasjw

Environment and configuration

DCM version: 5.6.0
Dart SDK version: 2.18.6 (stable) (Tue Dec 13 21:15:14 2022 +0000) on "macos_arm64"

Configuration
include: package:lints/recommended.yaml

analyzer:
  plugins:
    - dart_code_metrics

dart_code_metrics:
  anti-patterns:
    - long-parameter-list
  metrics:
    number-of-parameters: 3

What did you do?

Run dart run dart_code_metrics:metrics analyze lib --fatal-warnings

void function3Param(
  int param1,
  int param2,
  int param3,
) {}

void function4Param(
  int param1,
  int param2,
  int param3,
  int param4,
) {}

Full code:
reproduce_metrics.zip

What did you expect to happen?

The exit code should NOT return 0

What actually happened?

Exit code is 0

~/IdeaProjects/reproduce_metrics  
$ dart run dart_code_metrics:metrics analyze lib --fatal-warnings
✔ Analysis is completed. Preparing the results: 0.4s

lib/reproduce_metrics.dart:
        Long Parameter List. This function require 4 arguments.
        at /Users/xxx/IdeaProjects/reproduce_metrics/lib/reproduce_metrics.dart:7:1
        long-parameter-list : https://dcm.dev/docs/individuals/anti-patterns/long-parameter-list

~/IdeaProjects/reproduce_metrics  
$ echo $?
0

Participation

  • I am willing to submit a pull request for this issue.

Additional comments

The analyzer is working in the IDE

image

Metadata

Metadata

Assignees

Labels

type: bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions