Codecoverage reports must include .cls or .trigger extensions
- Dominant language
- No language data
- Stars
- 571
- Forks
- 80
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 3
Description
### Summary
Because the keys in the coverage report do not include the file extension (.cls or .trigger), when a sandbox has a class and a trigger with the same name, only the code coverage of the class, or the trigger, is added to the code coverage report. For instance, I can create a class called Lead.cls and a trigger called Lead.trigger, which would result in a coverage.json having a single entry for `Lead` as shown below:
````json
{
"no-map/Lead":{
"fnMap":{},
"branchMap":{},
"path":"no-map/Lead",
"f":{ },
"b":{},
"s":{
"1":1,
"2":1
},
"statementMap":{
"1":{
"start":{
"line":1,
"column":0
},
"end":{
"line":1,
"column":0
}
}
}
}
}
````
cobertura.xml format has the same problem.

### Steps To Reproduce:
1 - Create a class called `Lead`
2 - Create a trigger called `Lead`
3 - Write some apex test that covers both class and trigger
4 - run sfdx deploy validation command, but configure this command to return code coverage as a json.
use the following parameters as described in this doc: https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_force_source.htm#cli_reference_force_source_deploy
````
[--resultsdir RESULTSDIR]
[--coverageformatters COVERAGEFORMATTERS]
[--junit]
````
5 - open the coverage report and verify it contains a single entry called `no-map/Lead`
### Expected result
Code coverage report must include .cls or .trigger extensions
`no-map/Lead.cls`
`no-map/Lead.trigger`
### Actual result
Code coverage report does not include .cls or .trigger extensions
`no-map/Lead`
does this code coverage report belong to a class or a trigger? we can't determine it
### System Information
bash

Contributor guide
Assessment
This issue has not been assessed yet.