cpp-lln-lab / CPP_PTB

a set of function to make it easier to create behavioral, EEG, fMRI experiment with psychtoolbox
https://cpp-ptb.readthedocs.io/en/latest/index.html#
MIT License
12 stars 13 forks source link

miss_hit supports checking metrics too #52

Closed florianschanda closed 3 years ago

florianschanda commented 3 years ago

Hi,

I am extremely delighted to see people use MISS_HIT :)

You might like to know that mh_metric can produce metrics (including McCabe cyclomatic complexity) and optionally enforce limits. This work also for MATLAB code embedded in Simulink models; and I plan to add support for Simulink models themselves. Special comments can be added to the code to justify exceeding limits, which also appear in the final report.

Let me know (by raising issues) if you want more features (e.g. different metrics or a different way to report e.g. json, ...)

Remi-Gau commented 3 years ago

hey @florianschanda

Cool to see you here !

Wanted to open a PR on your repo to fix a typo (this my level of understanding of MH so far. :smile:)

Really loving what you are doing. Thanks a million times.

For code metrics I was relying on a wraper function I created around mlint to sort of limit the McCabe complexity but because mlint does not work on octave there was no way to include that in the travis continuous integration.

Will try to implement mh_metrics part in my travis configuration to add additional checks on code quality.

Have not looked into the pragmas yet: will try to take the time to play around with those.

I had a couple of questions / suggestions. Will ask on a your repo.

Remi-Gau commented 3 years ago

Oh and I will most likely soon tell a couple of people about MH. I think they will be VERY interested by it. :rocket:

florianschanda commented 3 years ago

Thank you, it's great news that it's useful elsewhere :)

As to Octave, miss_hit should work (with the exception of default parameters, but I have an open issue for that). I have not made this a priority right now, but I am very much committed to making sure Octave works in the long term. In fact one of the killer features I can see in the future is a program that checks if any m file works in both matlab and octave, and does the same thing. Possibly even with a machine checked proof.

I look forwards to your PRs :)