MATLAB Independent, Small & Safe, High Integrity Tools - code formatter and more
Add another method of tracing Simulink models via block properties.
The top-level system of a Simulink Library (but not Model) no longer appears in the tracing output, as there is no way to access or manipulate this in the Simulink user interface.
Add new option --untagged-blocks-inherit-tags
for mh_trace
which
cases any untagged system to inherit any tags from its parent. Once
new tags are encountered this breaks the inheritence chain. Note
that embedded MATLAB blocks are unaffected by this option.
Fix issue where a Simulink model with self-contained links would not parse the referenced systems. Only the top-level system would be parsed and references were never followed.
Fix issue where a Simulink model with referenced stateflow would not parse the referenced machines and charts.
Fix issue in mh_trace
where sometimes LOBSTER tags could be
generated which contained spaces.
Support multi-line and HTML annotations in Simulink for mh_trace
annotations.
Rework mh_trace
and its output format. It now generates LOBSTER
traces. See https://github.com/bmw-software-engineering/lobster for
more information, including a description of the interchange
format. The old output format is no longer supported now that there
is a good standard.
Add support for Simulink tracing in mh_trace
. You can add
annotations to any block starting with the text lobster-trace:
followed by a list of requirement tags. For example lobster-trace: foo.my_req
.
Remove mh_trace
commandline flag --json
and replace it with
--out-imp
and --out-act
. The default filename produced is now
mh_imp_trace.lobster
and mh_act_trace.lobster
.
Remove mh_trace
commandline flag --by-tag
. You can use a tool
like LOBSTER to recover this information.
Add mh_trace
commandline flag --only-tagged-blocks
. This filters
out all Simulink blocks that do not contain at least one tag.
Fix a bug in mh_trace
where precisely duplicated package +
function names result in only one tracable item. Now there are two,
and a tool like LOBSTER will complain.
You can now specify more precise Octave and MATLAB versions. This
change is massive, and likely to have subtle bugs. You can now write
octave: "4.4"
or matlab: "2020b"
in your config files; or specify
--octave=4.4
or --matlab=2020b
from the command-line. There is
also a special latest
version for both Octave and MATLAB, which is
an alias for the latest supported version.
This is also the first change that introduces backwards incompatibility, specifically:
--octave
no longer works. You need to
specify --octave=latest
to get the same behaviour.octave: true
still works, but is
deprecated. It means the same thing as octave: "latest"
.octave: false
doesn't make sense anymore (and
never really did), so it now raises an error.As always note that for MATLAB, support should be fairly good and
accurate. For Octave many things are missing (such as the end_X
set of keywords). I do plan to improve the situation, but please
create tickets for things you need sooner.
Several tools that generate messages (mh_style
, mh_metric
, and
mh_lint
) will now add the originating check id in the message. For
example:
In test.m, line 4
| false = 0.01; % bad
| ^^^^^ check (medium): redefining this builtin is very naughty [builtin_shadow]
This should make it much easier to disable rules if you don't like to read the manual.
MISS_HIT now recognises and processes Octave test .tst
files
(along with .m
and .slx
files). The Octave test annotation
language (comments starting with %!
) is ignored by MH Style for
now. Thank you to Alois Spitzbart for the idea.
Add a new configuration option "indent_function_file_body" for MH Style. This is true by default. If you set it to false, then you get the odd indentation style that somewhat common in the MATLAB world, where functions in function files do not have their body indented. For example:
function z = Potato(w)
z = -w;
Note that this option only affects top-level functions in function files. Any other function (e.g. a method, or a nested function) is not affected.
Fix an issue where a broken symlink could cause the tools to crash in some circumstances. Broken symlinks are now ignored.