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

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

Closed
1 task
kefasjw opened this issue Feb 16, 2023 · 2 comments
Closed
1 task

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

kefasjw opened this issue Feb 16, 2023 · 2 comments
Assignees
Labels
type: bug Something isn't working
Milestone

Comments

@kefasjw
Copy link

kefasjw commented Feb 16, 2023

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

@kefasjw kefasjw added the type: bug Something isn't working label Feb 16, 2023
@incendial
Copy link
Member

Thank you for the report!

@incendial incendial added the waiting for release Will be available after new version is released label Feb 18, 2023
@incendial incendial added this to the 5.7.0 milestone Feb 18, 2023
@incendial
Copy link
Member

Available in 5.7.0 🚀

@incendial incendial removed the waiting for release Will be available after new version is released label Mar 22, 2023
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants