MatrixBerryCore
MCodeQualityUtils.m
Go to the documentation of this file.
1 classdef MCodeQualityUtils
2  methods (Static)
3  function varargout=mlintScanAll()
4  import mxberry.selfmnt.OwnPathUtils;
5  [dirList,patternToExclude]=...
6  OwnPathUtils.getOwnCodeDirList();
7  %
8  if nargout==0
9  mxberry.dev.MLintScanner.scanWithHtmlReport(dirList,...
10  patternToExclude);
11  else
12  varargout=cell(1,nargout);
13  [varargout{:}]=...
15  dirList,patternToExclude);
16  end
17  end
18  function fileList=smartIdentAll()
19  import mxberry.selfmnt.OwnPathUtils;
20  fileList=OwnPathUtils.getFileListByExtensionList({'m'});
21  %
22  cellfun(@applySmartIndent,fileList);
23  end
24  end
25 end
26 function applySmartIndent(fileName)
27 h = matlab.desktop.editor.openDocument(fileName);
28 h.smartIndentContents();
29 h.save();
30 h.close();
31 delete(h);
32 end
function scanWithHtmlReport(in dirList, in patternToExclude)