-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update find file func according to latest go/cover code #23
Open
richardlt
wants to merge
3
commits into
t-yuki:master
Choose a base branch
from
richardlt:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pull Request Test Coverage Report for Build 34
💛 - Coveralls |
FYI, this PR and the underlying fork by @richardlt helped me fix the XML coverage report I generate for Codacy on the open source project I'm working on! 🎉 Cf signaux-faibles/opensignauxfaibles#289 (in French, but the diff and figures should be self explanatory) => I recommend to merge that PR. And thank you Richard, for this fix! 🙌 |
adrienjoly
added a commit
to signaux-faibles/opensignauxfaibles
that referenced
this pull request
Jan 11, 2021
## Problème Suite à la fusion de PR #286 (sensée augmenter le score de couverture des fichiers Go), le score de couverture rapporté par Codacy a baissé de 29 points. (cf #286 (comment)) ## Analyse En réexécutant en local la chaine de mesure employé en CI, je me suis rendu compte que nos fichiers Go les plus couverts montraient un score très bas sur codacy (ex: [`apconso.go`](https://app.codacy.com/gh/signaux-faibles/opensignauxfaibles/file/51943291072/coverage?bid=18037842&fileBranchId=18037842) avec un score de 6%) alors que la couverture retourné par `go test` est élevée. (66%, toujours sur `apconso.go`) Il s'avère que cette erreur de calcul est causée par l'outil `github.com/t-yuki/gocover-cobertura` employé pour générer un rapport XML requis par Codacy, à partir des résultats fournis par `go test`. Cette erreur a été corrigée dans une PR non fusionnée ([Update find file func according to latest go/cover code](t-yuki/gocover-cobertura#23)). ## Résolution - remplacer l'outil `github.com/t-yuki/gocover-cobertura` par le fork `github.com/richardlt/gocover-cobertura` (créé par l'auteur de la PR corrige mentionnée ci-dessus) ## Résultats Rapport XML avant cette PR: ```xml <class name="APConso" filename="github.com/signaux-faibles/opensignauxfaibles/lib/apconso/main.go" line-rate="0.04761905" branch-rate="0" complexity="0"> <methods> <method name="Key" signature="" line-rate="0.071428575" branch-rate="0" complexity="0"> <lines> <line number="26" hits="0"></line> <line number="27" hits="0"></line> <line number="28" hits="0"></line> <line number="26" hits="0"></line> <line number="27" hits="0"></line> <line number="28" hits="0"></line> <line number="26" hits="0"></line> <line number="27" hits="0"></line> <!-- plusieurs fois chaque numéro de ligne, avec un hits à 0 dans la plupart des cas --> ``` Après cette PR: ```xml <class name="APConso" filename="github.com/signaux-faibles/opensignauxfaibles/lib/apconso/main.go" line-rate="0.6666667" branch-rate="0" complexity="0"> <methods> <method name="Key" signature="" line-rate="1" branch-rate="0" complexity="0"> <lines> <line number="26" hits="6"></line> <line number="27" hits="6"></line> <line number="28" hits="6"></line> </lines> </method> <method name="Type" signature="" line-rate="0" branch-rate="0" complexity="0"> <lines> <line number="31" hits="0"></line> <line number="32" hits="0"></line> <line number="33" hits="0"></line> </lines> </method> ``` Augmentation du [score de couverture rapporté par Codacy](https://app.codacy.com/gh/signaux-faibles/opensignauxfaibles/pullRequest?prid=6777846): 
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Just an update from latest version of the go cover tool, this improve the way that golang file path are retrieve from profile.
On a big project like the one I'm working on (github.com/ovh/cds), it used to take more than 3 minutes to generate a report now its only 3 seconds.