Closed HomeAutoUser closed 2 years ago
Merging #1038 (e3a8cca) into master (6959426) will increase coverage by
0.10%
. The diff coverage is80.00%
.
@@ Coverage Diff @@
## master #1038 +/- ##
==========================================
+ Coverage 60.68% 60.78% +0.10%
==========================================
Files 117 117
Lines 9004 8984 -20
Branches 1411 1409 -2
==========================================
- Hits 5464 5461 -3
+ Misses 2533 2518 -15
+ Partials 1007 1005 -2
Flag | Coverage Δ | |
---|---|---|
fhem | 51.54% <50.00%> (+0.10%) |
:arrow_up: |
modules | 60.78% <80.00%> (+0.10%) |
:arrow_up: |
perl | 91.61% <80.00%> (-0.05%) |
:arrow_down: |
unittests | 60.78% <80.00%> (+0.10%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Impacted Files | Coverage Δ | |
---|---|---|
FHEM/lib/SD_Protocols.pm | 79.17% <50.00%> (-0.10%) |
:arrow_down: |
t/SD_Protocols/02_ConvLaCrosse.t | 100.00% <100.00%> (ø) |
|
t/FHEM/14_SD_BELL/09_parseDatat.t | ||
t/FHEM/14_SD_AS/00_load.t | 100.00% <0.00%> (ø) |
|
FHEM/00_SIGNALduino.pm | 63.81% <0.00%> (+0.64%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 6959426...e3a8cca. Read the comment docs.
Wollen wir denn jetzt wirklich alles doppelt und dreifach prüfen? Diese Prüfung ist doch schon in der 00_SIGNALduino.pm sub SIGNALduino_Parse_MN enthalten:
if ($rmsg !~ /^MN;D=[0-9A-F]+;(?:R=[0-9]+;)?$/){
$hash->{logMethod}->($hash->{NAME}, 3, qq[$hash->{NAME}: Parse_MN, faulty msg: $rmsg]);
return ; # Abort here if not successfull
}
Es geht mir in diesem PR nicht ums doppelt prüfen, es geht mir um die Robustheit der Sub als einzelnes. Der Gedanke war mal, das man Subs, einzeln nutzen kann um ggf Code zu sparen. Ja es kommt sehr selten vor. (fast unwarscheinlich in Devicespezifischen)
Nur wenn man jede Sub separat absichert, so kann man diverse PERL WARNINGs vermeiden. Es macht in meinen Augen keinen Sinn, Subs aufzurufen und zu testen indem man künstlich Warnings generiert. Entweder richtig oder die Liste und Logs werden länger und länger mit WARNINGs.
@sidey79 bittefein :-)
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
[ ] Bugfix (please link issue)
[ ] Feature enhancement
[ ] Documentation update
[ ] Unittest enhancement
[x] other
What is the current behavior? (You can also link to an open issue here, if this describes the current behavior)
2021-11-23T22:45:19.0077148Z ##[error]Illegal hexadecimal digit 'P' ignored at FHEM/lib/SD_Protocols.pm line 1973.
--> cause, test submit not valid hex value https://github.com/RFD-FHEM/RFFHEM/blob/d01e9cd12ac8cc80c3de6f7912c9fb7061db79ff/t/SD_Protocols/02_ConvLaCrosse.t#L65-L71 --> sub in SD_Protocols.pm does not check for HEX validity https://github.com/RFD-FHEM/RFFHEM/blob/d01e9cd12ac8cc80c3de6f7912c9fb7061db79ff/FHEM/lib/SD_Protocols.pm#L1964-L1974What is the new behavior (if this is a feature change)?
Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
Other information: