actually log error on exit - #3344
Conversation
Up to standards βπ’ Issues
|
| Metric | Results |
|---|---|
| Duplication | 31 |
π’ Coverage 0.00% diff coverage Β· +0.00% coverage variation
Metric Results Coverage variation β +0.00% coverage variation (-1.00%) Diff coverage β 0.00% diff coverage Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (5056d4a) 84104 19349 23.01% Head commit (dcd717f) 84104 (+0) 19349 (+0) 23.01% (+0.00%) Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#3344) 1 0 0.00% Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
|
Since #3140 you can simply return the error instead: if err != nil {
return fmt.Errorf("failed to initialize antivirus service: %w", err)
}Supervised mode: the service runs in-process ( Standalone mode: since #3140 cobra is silenced, Also matches the debug server block below, which already returns its error. The |
|
Sorry for disabling auto-merge, I would like you to look at my comment before it's merged π If you disagree, just reenable auto-merge/click merge edit: |
|
@dschmidt Absolutely true. However, this is not the only place where we exit(1) π I'll create an issue to track that. |
exiting withoul logging is not nice ... fmt.Errorf ... does not log the error, it just renders the string and returns it ...