codacy / codacy-coverage-reporter

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

[TS-231] Can't guess the report language #446

Closed axelrindle closed 1 year ago

axelrindle commented 1 year ago

I want to test software written in TypeScript. While the tests succeed, the pipeline still fails due to the following error reported by the Codacy Coverage Reporter:

2023-02-09 17:06:27.193Z  info [ConfigurationRules] API base URL: https://api.codacy.com/  - (ConfigurationRules.scala:81)
2023-02-09 17:06:27.591Z  info [CommitUUIDProvider] CI/CD provider GitHub Actions found Commit UUID 2588ce8890bf6073390ff89cc2eb632995f60de6  - (CommitUUIDProvider.scala:133)
2023-02-09 17:06:27.718Z  info [ReportRules] Parsing coverage data from: /home/runner/work/planningpoker/planningpoker/packages/backend/coverage/lcov.info ...  - (ReportRules.scala:37)
2023-02-09 17:06:27.724Z  info [ReportRules] Coverage parser used is com.codacy.parsers.implementation.LCOVParser$@5f72f710  - (ReportRules.scala:42)
2023-02-09 17:06:27.727Z  info [ReportRules] Generated coverage report: /tmp/codacy-coverage-14916603892701900443.json (12.08 kB)  - (ReportRules.scala:301)
2023-02-09 17:06:27.727Z  info [ReportRules] Uploading coverage data...  - (ReportRules.scala:302)
2023-02-09 17:06:27.727Z  info [ReportRules] 
To complete the reporting process, call coverage-reporter with the final flag.
 Check https://docs.codacy.com/coverage-reporter/#multiple-reports
 for more information.  - (ReportRules.scala:80)
2023-02-09 17:06:27.727Z error [CodacyCoverageReporter] Can't guess the report language  - (CodacyCoverageReporter.scala:25)

See here for the full log.

Here is a sample lcov.info file: https://gist.github.com/axelrindle/2eaa24ccd4dec3416bd7d8ddd6794615

I suspect the cause of this is the reporter not recognising the .mts as a TypeScript file.

github-actions[bot] commented 1 year ago

Internal ticket created : TS-231

axelrindle commented 1 year ago

Seems to be the same problem as in codacy/codacy-plugins-api#65

axelrindle commented 1 year ago

Update: the following setting did the trick:

language: typescript
DMarinhoCodacy commented 1 year ago

Hello @axelrindle

Thanks for reporting this.

I'm glad you could handle this situation very well and I saw that the latest coverage reports were sent successfully.

Kind regards, David Marinho