aodn / imos-toolbox

Graphical tool for QC'ing and NetCDF'ing oceanographic datasets
GNU General Public License v3.0
45 stars 30 forks source link

Instances of magExt variable not renamed to magdec_name_extension in workhorseParse.m #743

Closed sspagnol closed 3 years ago

sspagnol commented 3 years ago

In workhorseParse.m looks like the old magExt variable was renamed to magdec_name_extension, but there are still instances of magExt used in the isWaveData code block.

And maybe magdec_name_extension needs to initialized after line 60 before the if statement

magdec_name_extension = '';

And there are usages of magdec_name_comment.

sspagnol commented 3 years ago

Wonder why you just use the struct magdec_xattrs and

magdec_name_extension --> magdec_attrs.extension magdec_name_comment -- > magdec_attrs.comment

ocehugo commented 3 years ago

Thanks ! confirmed. We just merged a hotfix but didn't create a tag, so I will recompile the stuff and include this in the fix.

This happened because we don't have tests for wave data. It would be good to have one - the fix is easy though so I will skip that so we can release the hot fix tomorrow

ocehugo commented 3 years ago

In fact, this is a combination of problems: lack of test available and an incomplete Matlab checker:

something_that_exists = another_var_that_doest_exist

the above is not warned at all, only at the run/execution time of the line, which never happened since that wave-related code has no tests.