Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MlintBear #2372

Closed
wants to merge 1 commit into from
Closed

Add MlintBear #2372

wants to merge 1 commit into from

Conversation

li-boxuan
Copy link
Member

@li-boxuan li-boxuan commented Mar 22, 2018

Perform lint check on Matlab code.

Closes #2352

For short term contributors: we understand that getting your commits well
defined like we require is a hard task and takes some learning. If you
look to help without wanting to contribute long term there's no need
for you to learn this. Just drop us a message and we'll take care of brushing
up your stuff for merge!

Checklist

  • I read the commit guidelines and I've followed
    them.
  • I ran coala over my code locally. (All commits have to pass
    individually.
    It is not sufficient to have "fixup commits" on your PR,
    our bot will still report the issues for the previous commit.) You will
    likely receive a lot of bot comments and build failures if coala does not
    pass on every single commit!

After you submit your pull request, DO NOT click the 'Update Branch' button.
When asked for a rebase, consult coala.io/rebase
instead.

Please consider helping us by reviewing other peoples pull requests as well:

The more you review, the more your score will grow at coala.io and we will
review your PRs faster!

@li-boxuan
Copy link
Member Author

I have some concerns here:

  1. Users need to add mlint executable to PATH. For example, on a Mac with MATLAB_R2017a installed:

    export PATH="/Applications/MATLAB_R2017a.app/bin/maci64:$PATH"

    I wonder where I should put this instruction?

  2. I used lengthofline.m and lengthofline2.m as test files. They are copied from Matlab sample code (See MathWorks copyright on both files) . Would it be a copyright issue?

Perform lint check on Matlab code.

Closes coala#2352
@ankitxjoshi
Copy link
Contributor

@li-boxuan adding the executable to the environment path is a basic requirement for many linters, if one wishes to execute them using CLI. This could happen with most of the linters. The error message submitted by coala would simply be executable not installed. Modifying it just for this special case IMO is not necessary.
As for the copyright issue is it necessary to use MathWord code? Can't you come up with some test cases of your own?

@li-boxuan
Copy link
Member Author

@MacBox7 Thanks for comments!

adding the executable to the environment path is a basic requirement for many linters

This case is special to me because it is not trivial to find the mlint executable. It is not documented on Matlab website (They don't even tell users that there is such an executable; they only say mlint is a function call in Matlab). I didn't know the existence of mlint executable until I saw https://github.com/Gimly/vscode-matlab/blob/master/README.md.

Can't you come up with some test cases of your own?

Yes, sure. The reason I used official examples is that I found them pretty nice and this would be consistent with the example on https://www.mathworks.com/help/matlab/ref/mlint.html. I would write my own test cases if it's necessary (but may not be as good as official ones).

Copy link
Member

@jayvdb jayvdb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

definitely cant accept with example code from non-free sources.

Also, a decision re non-free linters, they should be in their own repo, at https://gitlab.com/coala/non-free-linter-bears , so they dont cause a maintenance burden on the rest of coala, and so they can have specific documentation about each, and also we can start to build a different infrastructure in that repository for them.

@jayvdb
Copy link
Member

jayvdb commented Apr 7, 2018

I've closed the issue.
We can leave this PR open for a while, until you've migrated the bear to the new repo.

@jayvdb
Copy link
Member

jayvdb commented Jul 9, 2018

Looks like this wont be migrated until after GSoC. Closing

@jayvdb jayvdb closed this Jul 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Add mlint bear
4 participants