{"id":15716423,"url":"https://github.com/florianschanda/miss_hit","last_synced_at":"2025-04-04T19:15:14.740Z","repository":{"id":40792463,"uuid":"222237460","full_name":"florianschanda/miss_hit","owner":"florianschanda","description":"MATLAB Independent, Small \u0026 Safe, High Integrity Tools - code formatter and more","archived":false,"fork":false,"pushed_at":"2024-09-02T17:14:36.000Z","size":4255,"stargazers_count":165,"open_issues_count":69,"forks_count":20,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-10-25T04:46:32.334Z","etag":null,"topics":["code-formatter","formal-methods","lexer","linter","matlab","metrics","octave","parser","python3","simulink","static-analyzer","style-checker"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/florianschanda.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-17T11:27:57.000Z","updated_at":"2024-10-20T06:52:14.000Z","dependencies_parsed_at":"2024-06-21T02:14:17.181Z","dependency_job_id":"a7d09cec-86c6-429f-9b91-478cf6767365","html_url":"https://github.com/florianschanda/miss_hit","commit_stats":{"total_commits":694,"total_committers":8,"mean_commits":86.75,"dds":0.03746397694524495,"last_synced_commit":"f01fbf9cd43c52fdb8fe6dce162c9772637ec199"},"previous_names":[],"tags_count":44,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/florianschanda%2Fmiss_hit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/florianschanda%2Fmiss_hit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/florianschanda%2Fmiss_hit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/florianschanda%2Fmiss_hit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/florianschanda","download_url":"https://codeload.github.com/florianschanda/miss_hit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247234923,"owners_count":20905854,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code-formatter","formal-methods","lexer","linter","matlab","metrics","octave","parser","python3","simulink","static-analyzer","style-checker"],"created_at":"2024-10-03T21:45:36.492Z","updated_at":"2025-04-04T19:15:14.706Z","avatar_url":"https://github.com/florianschanda.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3967056.svg)](https://doi.org/10.5281/zenodo.3967056)\n\n# MATLAB Independent, Small \u0026 Safe, High Integrity Tools\n\nhttp://misshit.org\n\nMATLAB is a popular programming language in many engineering\ndisciplines, intended for the fast development of prototypes. But as\nwe all know, prototypes make it into production all the time, so now\nyou're stuck. Unfortunately, there are no style checkers or \"good\"\nstatic analysis tools for MATLAB. This project attempts to fill this\ngap.\n\nIf you have MATLAB (or MATLAB embedded in Simulink models) in your\nproduction code and want to improve code quality then this tool-suite\nis for you.\n\n## Tools \u0026 Documentation\n\nMISS_HIT comes with the following tools, all of which come with user\nmanuals and setup instructions:\nhttps://florianschanda.github.io/miss_hit/\n\n* Style Checker `mh_style`\n\n  A simple coding style checker and code formatter for MATLAB or\n  Octave code, including MATLAB embedded inside Simulink models.\n\n* Code Metrics `mh_metric`\n\n  A simple code metric tool for MATLAB or Octave code, including\n  MATLAB embedded inside Simulink models.\n\n* Bug finding `mh_lint`\n\n  A simple linter for MATLAB or Octave code, including\n  MATLAB embedded inside Simulink models.\n\n* Code/Test traceability `mh_trace`\n\n  A simple tool to extrace tags from test and code to demonstrate\n  requirements traceability.\n\n* Diff helper `mh_diff`\n\n  A tool for diffing MATLAB code inside Simulink models. Note that\n  other changes (e.g. different connections) are not detected; this is\n  only working for embedded MATLAB.\n\n* Copyright notice helper `mh_copyright`\n\n  A tool that can update or adjust copyright notices in bulk. Helpful\n  if your company changes name, or you have year ranges that need\n  updating.\n\nPlease refer to the [release notes](https://github.com/florianschanda/miss_hit/blob/master/CHANGELOG.md)\nfor a summary of recent changes and known issues.\n\nWe intend to provide more tools later, please refer to the\n[roadmap](https://github.com/florianschanda/miss_hit/blob/master/ROADMAP.md)\nfor more information.\n\n## Installing and using MISS_HIT\n\n### Installation via pip\n\n```\n$ pip3 install --user miss_hit\n```\n\nThis installation also adds five executable scripts `mh_style`,\n`mh_metric`, `mh_lint`, `mh_copyright`, and `mh_diff` into\n`.local/bin`, so please make sure that this is on your `PATH`.\n\nYou can also use the `python -m` syntax to directly invoke the\nprogram. This might be useful if you're on a heavily locked-down\ncorporate Windows environment:\n```\n$ python3 -m miss_hit.mh_style\n```\n\nTo use MISS_HIT you just give it a set of files or directories to\nprocess, for example:\n```\n$ mh_style my_file.m\n$ mh_style --process-slx my_model.slx\n$ mh_style src/\n```\n\nConfiguration and setup is described in the\n[user manuals](https://florianschanda.github.io/miss_hit)\n\n### Installation via pipx\n\nVery similar to the above:\n\n```\n$ pipx install miss_hit --include-deps\n```\n\n### Installation by checkout\n\nIt is recommended to use pip or pipx, as that gets you the latest\nstable release. However, it is possible to directly use MISS_HIT from\na checkout. MISS_HIT currently does not require *any* non-standard\npython packages or libraries as dependencies. Just check out the\nrepository and put it on your path. That's it.\n\nThe version of Python I am using is `3.7` but any later version should\nalso work. I am not using any overly fancy language features.\n\n### Additional requirements for developing MISS_HIT\n\nIf you want to help develop you will need Linux as the test-suite\ndoesn't really work on Windows. You will also need Pylint,\nPyCodeStyle, Coverage, and Graphviz. Install as follows:\n\n```\n$ apt-get install graphviz\n$ pip3 install --user --upgrade pylint pycodestyle coverage\n```\n\nFor publishing releases (to GitHub and PyPI) you will also need:\n```\n$ pip3 install --user --upgrade setuptools wheel requests\n```\n\n## Challenges\n\nThere are serious issues present in the MATLAB and Octave languages on\nall levels (lexical structure, parsing, and semantics) that make it\nvery difficult to create any tool processing them. In fact, GitHub is\nlittered with incomplete attempts and buggy parsers. The usual\nquestion is \"but what about Octave?\"; it is a similar language, but it\nis not compatible with MATLAB. If your problem is parsing MATLAB then\nthe Octave parser will not help you. Even very simple statements such\nas `x = [1++2]` mean different things (`3` in MATLAB, syntax error in\nOctave).\n\nI have [documented the key\nissues](https://github.com/florianschanda/miss_hit/blob/master/CHALLENGES.md)\nwe've faced and how we've resolved them.\n\n## Copyright \u0026 License\n\nThe basic framework, style checker and code metrics tool of MISS_HIT\n(everything under `miss_hit_core`) are licensed under the GNU GPL\nversion 3 (or later) as described in\n[LICENSE](https://github.com/florianschanda/miss_hit/blob/master/LICENSE).\n\nThe advanced analysis tools of MISS_HIT (everything under `miss_hit`)\nare licensed under the GNU Affero GPL version 3 (or later) as\ndescribed in\n[LICENSE.AGPL](https://github.com/florianschanda/miss_hit/blob/master/LICENSE.AGPL).\n\nThe vast majority of this work is (C) Florian Schanda. Contributions\nfrom the following people and entities are under their copyright, with\nthe same license:\n\n* Alina Boboc (Documentation style)\n* Benedikt Schmid (MATLAB integration)\n* Remi Gau (CI/CD templates)\n* Veoneer System Software GmbH (JSON Metrics)\n* Zenuity AB (Key parts of the lexer)\n\n### Copyright of octave tests\n\nThis project includes verbatim and modified/adapted parts of the GNU\nOctave testsuite under `tests/parser/octave_*` and\n`tests/style/octave_annotations`. These are (c) their original\nauthors. Each file there describes from which file they derive.\n\n### Note on parser tests\n\nSome of the parser tests include code samples and documentation\nsnippets from the publicly available MathWorks website. An\nattribution (in comment form) is always included in these cases.\n\n### Note on the documentation assets\n\nThe documentation uses [feather\nicons](https://github.com/feathericons/feather/blob/master/LICENSE)\nwhich are licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflorianschanda%2Fmiss_hit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflorianschanda%2Fmiss_hit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflorianschanda%2Fmiss_hit/lists"}