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.
Addressing issue #67.
Use MATLAB's built in
analyzeCodeCompatibility
function to run a code compatibility report. The output table provides insight into code that is not compatible with newer versions of MATLAB.This runs the code compatibility report on the entire
mhkit
directory, and parses output from the code compatibility report. If "Error" is found is the Severity column, exit status 1 is returned.The information in this output is relevant to core developers, but not for feature developers. Failing the code compatibility analysis should not make the test fail. We plan to add a separate GitHub action capture the output, but this action is mostly for visibility.
Remaining Tasks
As of this PR there are only "Warnings" and "Info" in the code compatibility report. These should be addressed, but that work falls outside the scope of this PR.
Below is the condensed output from this report:
Details:
COLMP Details (Warning):
parula(64)
queries the 64-color parula colormap.DATNM Details (Info):
'datenum'
is not recommended.'datetime'
instead.DATST Details (Info):
'datestr'
is not recommended.'datetime'
instead.DISPLAYPROG Details (Info):
DISPLAY
is not recommended.DISP
orFPRINTF
instead.GETFMT Details (Info):
get
for retrieving values of numeric display format is not recommended.'settings'
object instead.HISTC Details (Info):
'histc'
is not recommended.'histcounts'
instead.IDISVARLOW Details (Warning):
LEGPVPAIR Details (Warning):
'legend'
has changed and might interpret the name of an argument as a legend property instead of a label.VERLESSMATLAB Details (Info):
verLessThan('matlab', ...)
is not recommended.'isMATLABReleaseOlderThan'
instead.