Run M-Lint on a directory tree and filter results

버전 1.2.0.1 (4.1 KB) 작성자: Malcolm Wood
Creates a report showing filtered results from M-Lint
다운로드 수: 1.5K
업데이트 날짜: 2016/9/1

라이선스 보기

This function addresses two of the major shortcomings of the M-Lint report which is available in the MATLAB Directory Browser. Firstly, it will perform a recursive analysis, i.e. the current directory and its subdirectories and their subdirectories etc. Secondly, it allows the user to filter out classes of message which are not of interest.
To run the function on a directory tree, simply change to that directory and type:
>> runmlint
An HTML report will be created, showing all the messages issed by M-Lint for files in the current MATLAB directory and its subdirectories.

To filter the results, create an "options" file. Each line in this file specifies a "filter", which can:
* filter out all messages with a specific ID
* filter out all messages in a specific file
* filter out messages with a specific ID in a specific file
* filter out all messages for a specific line in a specific file
* filter out messages with a specific ID for a specific line in a specific file

The format is described in the Help. Examples are:
| IgnoreAllID InefficientUsage:AndAnd
| IgnoreFileID InefficientUsage:InputNotUsed my_dir\myfile.m
| IgnoreLineID InefficientUsage:AssignmentNotUsed my_dir\myfile.m 99

Then pass the name of that file as an argument to "runmlint", e.g.
>> runmlint options.txt
The filters will be displayed at the top of the report, followed by the messages which have not been filtered out.

Tested in MATLABs 7.0.1 through 7.2 (R14sp1 through R2006a), but only on Windows. Should be platform independent, though the options file will need to have the right type of separators for the platform it is used on, and file names on all platforms will be compared case-insensitively.

All file names must be specified relative to the current MATLAB directory. The function will not be tolerant of things like leading or duplicated separators. It also doesn't tolerate directory names which contain spaces.

인용 양식

Malcolm Wood (2024). Run M-Lint on a directory tree and filter results (https://www.mathworks.com/matlabcentral/fileexchange/11855-run-m-lint-on-a-directory-tree-and-filter-results), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2006a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Search Path에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.2.0.1

Updated license

1.2.0.0

Added copyright line.

1.1.0.0

Review

1.0.0.0