codacy / codacy-coverage-reporter

Multi-language coverage reporter for Codacy
https://www.codacy.com
Other
135 stars 94 forks source link

[TCE-1089] LCOV format not parsable #510

Open Spacetown opened 2 months ago

Spacetown commented 2 months ago

Description

We added Codacy to GCOVR CI as a future replacement for Codecov.

Uploading LCOV files is failing without a meaningful error message:

2024-08-19 20:45:29.113Z  info [ReportRules] Parsing coverage data from: /home/runner/work/gcovr/gcovr/./tests/nested/reference/clang-13/coverage.lcov ...  - (ReportRules.scala:41)
2024-08-19 20:45:29.114Z  info [ReportRules] Parsing coverage data from: /home/runner/work/gcovr/gcovr/./tests/nested/reference/gcc-5/coverage.lcov ...  - (ReportRules.scala:41)
2024-08-19 20:45:29.115Z  info [ReportRules] Parsing coverage data from: /home/runner/work/gcovr/gcovr/./tests/nested/reference/gcc-8/coverage.lcov ...  - (ReportRules.scala:41)
2024-08-19 20:45:29.115Z  info [ReportRules] Parsing coverage data from: /home/runner/work/gcovr/gcovr/./tests/nested/reference/gcc-14/coverage.lcov ...  - (ReportRules.scala:41)
2024-08-19 20:45:29.116Z  info [ReportRules] Parsing coverage data from: /home/runner/work/gcovr/gcovr/./tests/nested/reference/clang-10/coverage.lcov ...  - (ReportRules.scala:41)
2024-08-19 20:45:29.116Z  warn [ReportRules] Could not parse report, unrecognized report format (tried: LCOV)  - (ReportRules.scala:59)
2024-08-19 20:45:29.116Z  warn [ReportRules] Could not parse report, unrecognized report format (tried: LCOV)  - (ReportRules.scala:59)
2024-08-19 20:45:29.116Z  warn [ReportRules] Could not parse report, unrecognized report format (tried: LCOV)  - (ReportRules.scala:59)
2024-08-19 20:45:29.116Z  warn [ReportRules] Could not parse report, unrecognized report format (tried: LCOV)  - (ReportRules.scala:59)
2024-08-19 20:45:29.116Z  warn [ReportRules] Could not parse report, unrecognized report format (tried: LCOV)  - (ReportRules.scala:59)

Environment

GitHup pipeline running on Ubuntu 22.04: https://github.com/gcovr/gcovr/actions/workflows/upload_coverage.yml

Expected Behavior

A error message which part of the file isn't accepted.

Actual Behavior

  1. The error message doesn't contain the problem:

    warn [ReportRules] Could not parse report, unrecognized report format (tried: LCOV)  - (ReportRules.scala:59)
  2. Accept files which follow the format description: https://github.com/linux-test-project/lcov/blob/07a1127c2b4390abf4a516e9763fb28a956a9ce4/man/geninfo.1#L989

Reproducible Test Case

Upload file https://github.com/gcovr/gcovr/blob/7.2/gcovr/tests/nested/reference/gcc-5/coverage.lcov

github-actions[bot] commented 2 months ago

Internal ticket created : TCE-1089