miss_hit

MATLAB Independent, Small & Safe, High Integrity Tools - code formatter and more

GPL-3.0 License

Downloads
12.1K
Stars
163
Committers
6

Bot releases are hidden (Show)

miss_hit - Release 0.9.42 Latest Release

Published by florianschanda over 1 year ago

0.9.42

  • Fix issue with MATLAB functions embedded in Simulink. Usually people
    left the default name (i.e. fcn) which caused many duplicate items
    to appear in the mh_trace output. Now embedded functions use the
    name of the subsystem (i.e. what you'd see in Simulink as the name).
miss_hit - Release 0.9.41

Published by florianschanda over 1 year ago

0.9.41

  • Fix parsing bug for argument and property validation blocks. The
    list of validation functions may be empty, previously the MISS_HIT
    parser complained about non-empty lists.
miss_hit - Release 0.9.40

Published by florianschanda over 1 year ago

0.9.40

  • Fix tool crash when encountering a Simulink area annotation with no
    text. These annotations are now properly supported and you can even
    add tracing text to them.
miss_hit - Release 0.9.39

Published by florianschanda over 1 year ago

0.9.39

  • 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.

miss_hit - Release 0.9.38

Published by florianschanda over 1 year ago

0.9.38

  • 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.

miss_hit - Release 0.9.37

Published by florianschanda over 1 year ago

0.9.37

  • 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.

miss_hit - Release 0.9.36

Published by florianschanda almost 2 years ago

0.9.36

  • Fixed minor issue where mh_trace was not made available as a
    command-line tool when installing the PyPI package miss_hit.
miss_hit - Release 0.9.35

Published by florianschanda about 2 years ago

0.9.35

  • 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:

    • The command-line option --octave no longer works. You need to
      specify --octave=latest to get the same behaviour.
    • The config setting octave: true still works, but is
      deprecated. It means the same thing as octave: "latest".
    • The config setting 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.

miss_hit - Release 0.9.34

Published by florianschanda about 2 years ago

0.9.34

  • Relaxed docstring recognition: now you can have blank lines (without
    the comment indicator) in your docstring.
miss_hit - Release 0.9.33

Published by florianschanda over 2 years ago

0.9.33

  • 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.

miss_hit - Release 0.9.32

Published by florianschanda over 2 years ago

0.9.32

  • [CORRECTNESS] Fix another lexer bug where a matrix with a unary
    minus in front did not correctly get interpreted as a separate
    element in some cases. This could be seen in [-.1 -~0] which was
    seen as -1.1, instead of [-.1 -1]. This could lead mh_style to
    change the meaning of the code. You will notice that this is almost
    the same as the bug in 0.9.31. I hate everything surrounding
    matrices. I suspect this will not be the laste one like this.
miss_hit - Release 0.9.31

Published by florianschanda over 2 years ago

0.9.31

  • [CORRECTNESS] Fix a lexer bug where a matrix with a unary minus in
    front did not correctly get interpreted as a separate element in
    some cases. This could be seen in [1 -[1]] which was seen as 0,
    instead of [1 -1]. This could lead mh_style to change the meaning
    of the code. This issue affected both matrices and cells.

  • In some cases configuration files could be parsed in a different
    order on different platforms. This makes no practical difference,
    except for some error messages that would be slightly differently
    worded. This can be visible in the internal MISS_HIT testsuite. This
    is now fixed.

miss_hit - Release 0.9.30

Published by florianschanda almost 3 years ago

0.9.30

  • Fix a lexing/parsing bug in all tools where classes containing more
    than one methods block, with a function named end in one of the
    blocks (but not the last one) would confuse the lexer in ending the
    special treatment for words such as methods prematurely. This
    manifested in a confusing error message pointing at methods
    stating that we expect methods.

    This is now fixed, and you can name functions end again, no matter
    where.

miss_hit - Release 0.9.29

Published by florianschanda about 3 years ago

0.9.29

  • Support the ! and != operators in Octave mode. In Octave mode we
    now also no longer parse ! as if it was a MATLAB shell escape.

  • Work around an extremely weird bug on some Windows envionments. The
    behaviour of os.path.abspath could sometimes differ, leading to
    weird problems like parsing the same config file twice (and then
    complaining about duplicate definitions). One known environment is
    using a Windows Python in a git bash environment, but there may be
    others. This is now hopefully fixed in all such cases.

miss_hit - Release 0.9.28

Published by florianschanda about 3 years ago

0.9.28

  • New command-line option for all tools (but only applicable for MH
    Metric for now): --ignore-justifications-with-tickets. This option
    can be used to ignore all justifications that quote a ticket. The
    idea here is that these would be temporary justifications (e.g. "to
    be fixed in ABC-123"), and you might want to check from time to time
    how much technical debt you have.

  • MH Lint now checks and enforces the correct syntax for TestTags.

miss_hit - Release 0.9.27

Published by florianschanda about 3 years ago

0.9.27

  • MH_Trace now considers all functions in an entrypoint/library tests
    directory to be a test (not just code in classes with a Test method
    block). This essentially adds support for test systems that are not
    based the matlab.unittest.TestCase.
miss_hit - Release 0.9.26

Published by florianschanda about 3 years ago

0.9.26

  • All tools have a new common option --include-version, which will
    print the MISS_HIT version similar to --version; but will continue
    execution. This is helpful to debug e.g. CI issues.

  • MH_Trace supports a new pragma No_Tracing, which can be used to
    remove functions from the tracing output. This can be helpful if you
    have e.g. a test driver or project initialisation code that is
    neither product code or a test.

miss_hit - Release 0.9.25

Published by florianschanda about 3 years ago

0.9.25

  • Support Octave identifiers in Octave mode. In Octave you can start
    identifiers with an underscore, but you can't do it in MATLAB.

  • Additional information in tracing output produced by mh_trace:

    • test - True if the function is a unit test and false otherwise.
    • shared - Only present if you use project configuration. True if
      this function is part of a library, and False if it is party of
      an entrypoint.
  • Minor improvement for error messages on config files with syntax
    errors: suggestions are offered now.

miss_hit - Release 0.9.24

Published by florianschanda about 3 years ago

0.9.24

  • Fix issue in MH Style where the new rule naming_parameters would
    complain about ~ parameters. These will now always pass name
    checking, regardless on how your regular expression for parameters
    looks like.
miss_hit - Release 0.9.23

Published by florianschanda over 3 years ago

0.9.23

  • MH Trace can now produce tracing information from code. You can place
    tracing tags in code using the new pragma Tag:

    %| pragma Tag("Potato");
    
  • MH Style and MH Copyright now support octave-style copyright notices
    (i.e. Copyright (c) ... instead of (c) Copyright ...).

    The default regular expression for matching copyright notices has
    changed and must now include a new group. If you have configured
    this setting, you must also include the new copy group in your
    regular expression, otherwise the tools break in interesting ways.

  • MH Style supports a new rule "naming_parameters" that enforces a
    naming scheme for function and method inputs and outputs.

  • MH Style supports a new rule "naming_enumerations" that enforces a
    naming scheme for class enumerations.

  • Fix various parsing corner cases in parsing extremely dubious
    code. MISS_HIT previously rejected all of these as parse errors, now
    it complains about (and fixes) the style instead:

    • A command-form invocation after a try on the same line is now
      correctly recognised: try rotate3d off; end

    • A global statement can be terminated by a comma or semicolon:
      try, global dt, f = f*dt; end

    • A single quote directly after a keyword introduces a character
      array: case'potato'

    • The expression in a for loop does not require any termination:
      for i=1:indx(1)-1 y(i) = y(indx(1)); end

  • Fix parsing of Contents.m in class directories (previously we
    expected some code, but these files are supposed to be blank).

  • Fix a tool crash in MH Metrics: when producing the HTML report the
    tool would crash if there were parse errors in at least one file.