RFD-FHEM / RFFHEM

Counterpart of SIGNALDuino, it's the code for FHEM to work with the data received from the uC
GNU General Public License v3.0
44 stars 33 forks source link

Call debug via a coderef if enabled, otherwise return #1169

Closed sidey79 closed 6 months ago

sidey79 commented 1 year ago

Calling the Debug output must be checked every time it may be needed. This causes seral checks and also while running unittests this causes serval uncoverable paths.

Debug is behind a coderef stored in the device hash If debug is enabled, then FHEM Debug sub is called if not, then we return from a anonymous sub which does nothing.

no

Calls for retrieving attribute debug value can be reduced later on.

codecov[bot] commented 1 year ago

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (0f23255) 69.58% compared to head (dcd7870) 70.78%.

Files Patch % Lines
FHEM/00_SIGNALduino.pm 88.46% 6 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1169 +/- ## ========================================== + Coverage 69.58% 70.78% +1.19% ========================================== Files 133 138 +5 Lines 10051 10104 +53 Branches 1623 1577 -46 ========================================== + Hits 6994 7152 +158 + Misses 1705 1643 -62 + Partials 1352 1309 -43 ``` | [Flag](https://app.codecov.io/gh/RFD-FHEM/RFFHEM/pull/1169/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=RFD-FHEM) | Coverage Δ | | |---|---|---| | [fhem](https://app.codecov.io/gh/RFD-FHEM/RFFHEM/pull/1169/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=RFD-FHEM) | `61.26% <88.67%> (+1.47%)` | :arrow_up: | | [modules](https://app.codecov.io/gh/RFD-FHEM/RFFHEM/pull/1169/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=RFD-FHEM) | `70.78% <88.67%> (+1.19%)` | :arrow_up: | | [perl](https://app.codecov.io/gh/RFD-FHEM/RFFHEM/pull/1169/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=RFD-FHEM) | `90.04% <ø> (-0.09%)` | :arrow_down: | | [unittests](https://app.codecov.io/gh/RFD-FHEM/RFFHEM/pull/1169/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=RFD-FHEM) | `70.78% <88.67%> (+1.19%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=RFD-FHEM#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

sidey79 commented 6 months ago

@HomeAutoUser Jetzt habe ich den Branch aktualisiert, jetzt bitte noch mal genehmigen :)