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] Gitlab reporter prints logs and JSON instead of JSON alone #1151

Open
@pwa-tapptic

Description

@pwa-tapptic
  • Dart code metrics version: 4.19.2, 4.21.3, 5.4.0
  • Dart sdk version: Dart SDK version: 2.17.3 (stable) (Wed Jun 1 11:06:41 2022 +0200) on "macos_x64"

What did you do? Please include the source code example causing the issue.
I run flutter pub run dart_code_metrics:metrics lib --reporter=gitlab > gitlab.json based on the documentation here.

This issue is version-specific, looks like it does not depend on any specific configuration.

What did you expect to happen?
As it is demonstrated in the documentation I am supposed to get valid JSON report (gitlab.json) with Gitlab style when I use gitlab reporter.

What actually happened?
Versions tested:

  • up until 4.19.2 JSON is valid
  • somewhere between 4.19.2 and 4.21.3 file has started containing also logs
  • it still does not work with the newest version 5.4.0
    Example bad JSON file:
�[2K
⠙ Analyzing...�[2K
�[2K
⠹ Analyzing 14 file(s)... 0.5s�[2K
⠸ Analyzing 14 file(s)... 2.9s�[2K
⠼ Analyzing 14 file(s)... 3.2s�[2K
⠴ Analyzing 14 file(s)... 3.3s�[2K
⠦ Analyzing 14 file(s)... 3.4s�[2K
⠧ Analyzing 14 file(s)... 3.5s�[2K
⠇ Analyzing 14 file(s)... 3.5s�[2K
✔ Analysis is completed. Preparing the results: 3.8s

[{}, {}] <- JSON ISSUES HERE

🆕 Update available! 4.21.3 -> 5.4.0
🆕 Changelog: https://github.com/dart-code-checker/dart-code-metrics/releases/tag/5.4.0

Are you willing to submit a pull request to fix this bug?
Unfortunately no.

Metadata

Metadata

Labels

type: bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions