> Pavel Sanda wrote: > > > well for the basic checks i usually see in Andre's syntax warnings we > > really dont need any third party code. few lines of greping will do. as my > > python skills are very limited i can write some set of tests in bash, but > > that will unusable for ms folks. > > Why bother with scripts if Andre' works pretty well?
we have already some stuff commited ;) write basic skeleton was hour and few minutes to add the first check on commas produce something like the attached. one can even automatically produce patch if there is somebody willing to commit. pavel
[32m../ledpar/src/BiblioInfo.cpp:[37m 485: cmd = cmd.substr(0,n); [32m../ledpar/src/Buffer.cpp:[37m 1281: top += params().language->code().substr(0,2); [32m../ledpar/src/Bullet.cpp:[37m 31:Bullet const ITEMIZE_DEFAULTS[4] = { Bullet(0, 8),//"\(\bullet\)" 32: Bullet(0, 0),//"\normalfont\bfseries{--}" 33: Bullet(0, 6),//"\(\ast\)" [32m../ledpar/src/Font.cpp:[37m 1006: Lexer lex(0,0); [32m../ledpar/src/Changes.cpp:[37m 181: // range (pos,pos+x) becomes (pos,pos+x-1) 185: // range (pos-x,pos) stays (pos-x,pos) 206: // range (pos,pos+x) becomes (pos+1,pos+x+1) 211: // range (pos-x,pos) stays as it is [32m../ledpar/src/Color.cpp:[37m 98: r = hexstrToInt(x11hexname.substr(1,2)); 99: g = hexstrToInt(x11hexname.substr(3,2)); 100: b = hexstrToInt(x11hexname.substr(5,2)); [32m../ledpar/src/Converter.cpp:[37m 654: G_.addEdge(s,t); [32m../ledpar/src/CutAndPaste.cpp:[37m 465: s, it.paragraph().id(), it.pos(), it.pos() + 1)); [32m../ledpar/src/FloatList.cpp:[37m 33:// š not absolutely global but somewhere where documents,layouts and [32m../ledpar/src/Layout.cpp:[37m 659: { "box", END_LABEL_BOX }, 660: { "filled_box", END_LABEL_FILLED_BOX }, 661: { "no_label", END_LABEL_NO_LABEL }, [32m../ledpar/src/LyX.cpp:[37m 725: // if lyxrc returns (0,0), then use session info 1123: kbmap->bind("~C-~S-~M-dead_ogonek",FuncRequest(LFUN_ACCENT_OGONEK)); [32m../ledpar/src/LyXAction.cpp:[37m 126: { LFUN_BUFFER_NEW_TEMPLATE,"buffer-new-template", NoBuffer, Buffer }, [32m../ledpar/src/LyXFunc.cpp:[37m 1128: changeExtension(dviname,".ps"); 1806: Lexer lex(0,0); 1838: Lexer lex(0,0); [32m../ledpar/src/LyXRC.cpp:[37m 178: { "\viewer" ,LyXRC::RC_VIEWER} [32m../ledpar/src/Paragraph.cpp:[37m 1061: : itemdepth(par.itemdepth), text_(par.text_), [32m../ledpar/src/Server.cpp:[37m 280: read_buffer_= split(read_buffer_, cmd,'n'); [32m../ledpar/src/TextClass.cpp:[37m 1071: n = n.substr(0,i); [32m../ledpar/src/TextClassList.cpp:[37m 202: // Declare(LaTeX|DocBook)Classs*([([^,]*)(,.*)*])*s*{(.*)} [32m../ledpar/src/TextMetrics.cpp:[37m 1627: Row const & row = pm.getRow(cur.pos(),cur.boundary()); 2113: pi.pain.fillRectangle(x + min(x1,x2), y1, abs(x2 - x1), y2 - y1, [32m../ledpar/src/Undo.cpp:[37m 365: d->doRecordUndo(kind, c, c.pit(), c.pit(), cur, false, true); [32m../ledpar/src/VCBackend.cpp:[37m 84: // Check if *,v exists. 93: // Check if RCS/*,v exists. [32m../ledpar/src/Variables.cpp:[37m 58: var = str.substr(match.first,match.second); [32m../ledpar/src/output_docbook.cpp:[37m 193: par = makeEnvironment(buf, os, runparams, paragraphs, par,send); 199: par = makeParagraph(buf, os, runparams, paragraphs, par,send); 279: par = makeCommand(buf, os, runparams, paragraphs, par,send); 285: par = makeEnvironment(buf, os, runparams, paragraphs, par,send); 290: par = makeParagraph(buf, os, runparams, paragraphs, par,send); 332: par = makeCommand(buf, os, runparams, paragraphs, par,send); 338: par = makeEnvironment(buf, os, runparams, paragraphs, par,send); 343: par = makeParagraph(buf, os, runparams, paragraphs, par,send); [32m../ledpar/src/frontends/qt4/EmptyTable.cpp:[37m 31: viewport()->resize(cellsize*rows,cellsize*columns); [32m../ledpar/src/frontends/qt4/FileDialog.cpp:[37m 167: toqstr(title_),toqstr(startsWith))))); [32m../ledpar/src/frontends/qt4/GuiApplication.cpp:[37m 180: LoaderQueue::setPriority(10,100); [32m../ledpar/src/frontends/qt4/GuiDocument.cpp:[37m 186: preamble_coords_[current_id_] = make_pair(0,0); 848: for (int n = 0; !token(items,'|',n).empty(); ++n) 850: addItem(toqstr(token(items,'|',n))); 893: for (int n = 0; !token(items,'|',n).empty(); ++n) { [32m../ledpar/src/frontends/qt4/GuiFontMetrics.cpp:[37m 66: //return metrics_.leftBearing(toqstr(docstring(1,c))); 91: // metrics_.rightBearing(toqstr(docstring(1,c))); 111: QString const s = toqstr(docstring(1,c)); 203: r = metrics_.boundingRect(toqstr(docstring(1,c))); 226: value = metrics_.width(toqstr(docstring(1,c))); [32m../ledpar/src/frontends/qt4/GuiLog.cpp:[37m 149: Lexer lex(0,0); [32m../ledpar/src/frontends/qt4/GuiNomencl.cpp:[37m 90: description.replace('n',"\\"); [32m../ledpar/src/frontends/qt4/GuiSelectionManager.cpp:[37m 163: selectedLV->setCurrentIndex(selectedLV->model()->index(0,0)); [32m../ledpar/src/frontends/qt4/GuiSetBorder.cpp:[37m 34: setMinimumSize(w,h); 35: setMaximumSize(w,h); 62: paint.drawLine(m + l ,h - m, m + l ,h - (m + l)); 66: paint.drawLine(h - m, h - (m + l), h - (m + l),h - (m + l)); [32m../ledpar/src/frontends/qt4/GuiView.cpp:[37m 947: // it is possible to get current toolbar status like this,... [32m../ledpar/src/frontends/qt4/GuiToolbar.cpp:[37m 502: // now because move(x,y) does not work for toolbar. [32m../ledpar/src/frontends/qt4/TocWidget.cpp:[37m 94: ? depth : getIndexDepth(index.parent(),depth); 114: tocTV->model()->index(0,0), [32m../ledpar/src/frontends/qt4/GuiWorkArea.cpp:[37m 678: QRect cur_r(0,0,0,0); [32m../ledpar/src/frontends/frontend_helpers.cpp:[37m 111: pair<docstring,docstring> const & dir1, 112: pair<docstring,docstring> const & dir2) 138: pair<docstring,docstring> const & dir1, 139: pair<docstring,docstring> const & dir2) 189: pair<docstring,docstring> const & dir1, 190: pair<docstring,docstring> const & dir2) [32m../ledpar/src/insets/ExternalSupport.cpp:[37m 388: return int(std::count(str.begin(), str.end(),'n')); [32m../ledpar/src/insets/InsetBox.cpp:[37m 56: translator.addPair("Doublebox",InsetBox::Doublebox); 488: Lexer lex(0,0); [32m../ledpar/src/insets/InsetBibtex.cpp:[37m 599: // (matching delimiters, missing commas,... [32m../ledpar/src/insets/InsetERT.cpp:[37m 445: Lexer lex(0,0); [32m../ledpar/src/insets/InsetBranch.cpp:[37m 321: Lexer lex(0,0); [32m../ledpar/src/insets/InsetCitation.cpp:[37m 205: // CITEP: (author,year) [32m../ledpar/src/insets/InsetCommand.cpp:[37m 199: Lexer lex(0,0); [32m../ledpar/src/insets/InsetExternal.cpp:[37m 892: Lexer lex(0,0); [32m../ledpar/src/insets/InsetFloat.cpp:[37m 420: Lexer lex(0,0); [32m../ledpar/src/insets/InsetGraphics.cpp:[37m 366: if (contains(params().rotateOrigin,"Top")) 368: else if (contains(params().rotateOrigin,"Bottom")) 370: else if (contains(params().rotateOrigin,"Baseline")) 850: return int(std::count(latex_str.begin(), latex_str.end(),'n')); 1015: Lexer lex(0,0); [32m../ledpar/src/insets/InsetInclude.cpp:[37m 365: DocFileName(changeExtension(included_file.absFilename(),".tex")). [32m../ledpar/src/insets/InsetListingsParams.cpp:[37m 742: // key=value,key=value1 is stored in params_ as key=value,key_=value1. 760: // key=value,key=value1 is allowed in listings [32m../ledpar/src/insets/InsetNote.cpp:[37m 373: Lexer lex(0,0); [32m../ledpar/src/insets/InsetQuotes.cpp:[37m 45: * g ,,german`` 46: * p ,,polish'' [32m../ledpar/src/insets/InsetTabular.cpp:[37m 792: if (isPartOfMultiColumn(row,column)) 1509: l_getline(is,line); 1510: if (!prefixIs(line,"<column")) { 4258: tabular.cellIndex(i,j), 4271: tabular.cellIndex(i,j), 4342: tabular.cellIndex(i,j), setLines); 4833: Lexer lex(0,0); [32m../ledpar/src/insets/InsetWrap.cpp:[37m 305: Lexer lex(0,0); [32m../ledpar/src/insets/InsetVSpace.cpp:[37m 248: Lexer lex(0,0); [32m../ledpar/src/insets/InsetHyperlink.cpp:[37m 82: url.replace(pos,1,backslash + chars_url[k]); 99: name.replace(pos,1,"\textbackslash{}"); 105: name.replace(pos,1,backslash + chars_name[k] + braces); 113: name.replace(pos,1,"$\sim$"); [32m../ledpar/src/mathed/InsetMathAMSArray.cpp:[37m 117: from_utf8(N_("Can't add vertical grid lines in '%1$s'")), name_)); [32m../ledpar/src/mathed/InsetMathNest.cpp:[37m 110:// with the correctly adjusted x,y values. But this means that we'd have 768: // sprintf(dispatch_buffer, "%d %d",); [32m../ledpar/src/mathed/InsetMathSplit.cpp:[37m 75: from_utf8(N_("Can't add vertical grid lines in '%1$s'")), name_)); [32m../ledpar/src/mathed/MathExtern.cpp:[37m 1155: out = out.substr(0,i) 1171: out = out.substr(0,j - 1) 1173: + out.substr(j,i - j) 1174: + out.substr(i + 5,k - i - 4) [32m../ledpar/src/mathed/MathMacro.cpp:[37m 101: CursorSlice const & sl, bool boundary, int & x, int & y) const [32m../ledpar/src/mathed/MathSupport.cpp:[37m 569: inh_series, Font::UP_SHAPE,Color::foreground}, [32m../ledpar/src/support/FileName.cpp:[37m 303: } else if (prefixIs(str,"%TGIF")) { 306: } else if (prefixIs(str,"#FIG")) { 309: } else if (prefixIs(str,"GIF")) { 325: else if (contains(str,"EPSF")) 345: if (contains(str,"EPSF")) [32m../ledpar/src/support/ForkedCallQueue.cpp:[37m 56: // If we fail to fork the process, then emit the signal 59: pro.second->operator()(0,1); [32m../ledpar/src/support/Forkedcall.cpp:[37m 183: // The weird (std::max)(a,b) signature prevents expansion [32m../ledpar/src/support/filetools.cpp:[37m 943: readBB_lyxerrMessage(file_, zipped,"no(e)ps-format"); 952: getline(is,s); [32m../ledpar/src/support/lyxsum.cpp:[37m 133: return do_crc(beg,end); 159: return do_crc(beg,end); [32m../ledpar/src/support/minizip/zipunzip.cpp:[37m 111: hFind = FindFirstFile(f,&ff32); 114: FileTimeToLocalFileTime(&(ff32.ftLastWriteTime),&ftLocal); 115: FileTimeToDosDateTime(&ftLocal,((LPWORD)dt)+1,((LPWORD)dt)+0); 132: if (strcmp(f,"-")!=0) { 138: strncpy(name, f,MAXFILENAME-1); 145: if (stat(name,&s)==0) { 215: NULL,0,NULL,0,NULL /* comment*/, 217: Z_DEFAULT_COMPRESSION, // compression level 221: NULL, // password, 225: printf("error in opening %s in zipfilen",filenameinzip); 238: printf("error in reading %sn",filenameinzip); 306: strcpy(buffer,newdir); 324: printf("couldn't create directory %sn",buffer); 345: FILETIME ftm,ftLocal,ftCreate,ftLastAcc,ftLastWrite; 347: hFile = CreateFile(filename,GENERIC_READ | GENERIC_WRITE, 348: 0,NULL,OPEN_EXISTING,0,NULL); 349: GetFileTime(hFile,&ftCreate,&ftLastAcc,&ftLastWrite); 350: DosDateTimeToFileTime((WORD)(dosdate>>16),(WORD)dosdate,&ftLocal); 351: LocalFileTimeToFileTime(&ftLocal,&ftm); 352: SetFileTime(hFile,&ftm,&ftLastAcc,&ftm); 371: utime(filename,&ut); 393: err = unzGetCurrentFileInfo(uf,&file_info,filename_inzip,sizeof(filename_inzip),NULL,0,NULL,0); 396: printf("error %d with zipfile in unzGetCurrentFileInfon",err); 433: err = unzOpenCurrentFilePassword(uf,password); 435: printf("error %d with zipfile in unzOpenCurrentFilePasswordn",err); 446: fout=fopen(write_filename,"wb"); 450: printf("error opening %sn",write_filename); 457: err = unzReadCurrentFile(uf,buf,size_buf); 459: printf("error %d with zipfile in unzReadCurrentFilen",err); 463: if (fwrite(buf,err,1,fout)!=1) { 473: change_file_date(write_filename,file_info.dosDate, 480: printf("error %d with zipfile in unzCloseCurrentFilen",err); 522: printf("error %d with zipfile in unzGetGlobalInfo n",err); 535: printf("error %d with zipfile in unzGoToNextFilen",err); [32m../ledpar/src/support/mkdir.cpp:[37m 79: strcpy(buffer,newdir); [32m../ledpar/src/tex2lyx/preamble.cpp:[37m 121: * bibformat={tabular,ibidem,numbered}