| changeset 3 | ebe3f8f03b59 |
| parent 0 | 638b9c697799 |
| 2:0cb2248d0edc | 3:ebe3f8f03b59 |
|---|---|
370 // ---------------------------------------------------------------------------- |
370 // ---------------------------------------------------------------------------- |
371 // HANodeIterator::addIssue |
371 // HANodeIterator::addIssue |
372 // Add issue found in analysis |
372 // Add issue found in analysis |
373 // ---------------------------------------------------------------------------- |
373 // ---------------------------------------------------------------------------- |
374 // |
374 // |
375 void HANodeIterator::addIssue(TIssueIdentity aIdentityId, TIssueType aTypeId, TBCSeverity bcseverity, TSCSeverity scseverity, string ignoreinfo, const XMLCh* fileid, const string name,int lineNumber) const |
375 void HANodeIterator::addIssue(TIssueIdentity aIdentityId, TIssueType aTypeId, TBCSeverity bcseverity, TSCSeverity scseverity, string ignoreinfo, const XMLCh* fileid, |
376 const string name,int lineNumber,const string issueloc) const |
|
376 { |
377 { |
377 bool lFlag = false; |
378 bool lFlag = false; |
378 if ( !fileid ) |
379 if ( !fileid ) |
379 { |
380 { |
380 fileid = this->GetAttribute(KXMLFileIdString); |
381 fileid = this->GetAttribute(KXMLFileIdString); |
385 const pair<const XMLCh*,bool>& file = iNodeIndex.FindFileByFileId(fileid); |
386 const pair<const XMLCh*,bool>& file = iNodeIndex.FindFileByFileId(fileid); |
386 |
387 |
387 string compareFileName(""); |
388 string compareFileName(""); |
388 |
389 |
389 list< pair<string,string> >::const_iterator it = iFilesToAnalyse.begin(); |
390 list< pair<string,string> >::const_iterator it = iFilesToAnalyse.begin(); |
390 |
|
391 /*int linenumber = 0; |
|
392 const XMLCh* strlinenumber = this->GetAttribute(KXMLLineString); |
|
393 |
|
394 if ( strlinenumber ) |
|
395 { |
|
396 linenumber = atoi(toString(strlinenumber).c_str()); |
|
397 } |
|
398 */ |
|
399 string filename(toString(file.first)); |
391 string filename(toString(file.first)); |
400 |
392 |
401 string::size_type dirSepInd = filename.find_first_of("\\/"); |
393 string::size_type dirSepInd = filename.find_first_of("\\/"); |
402 if( dirSepInd != string::npos && filename.at(dirSepInd) != DIR_SEPARATOR ) |
394 if( dirSepInd != string::npos && filename.at(dirSepInd) != DIR_SEPARATOR ) |
403 { |
395 { |
404 // We need to convert to proper dir-separator |
396 // We need to convert to proper dir-separator |
405 replaceChar(filename, filename.at(dirSepInd), DIR_SEPARATOR); |
397 replaceChar(filename, filename.at(dirSepInd), DIR_SEPARATOR); |
406 } |
398 } |
407 |
399 |
408 for (; it != iFilesToAnalyse.end(); ++it) |
400 for (; it != iFilesToAnalyse.end(); ++it) |
409 { |
401 { |
410 if (iBaselineNode) |
402 if (iBaselineNode) |
411 { |
403 { |
431 if(lFlag == true ) |
423 if(lFlag == true ) |
432 { |
424 { |
433 if ( iBaselineNode ) |
425 if ( iBaselineNode ) |
434 { |
426 { |
435 this->iReport.addIssue(filename, |
427 this->iReport.addIssue(filename, |
436 fqname, aIdentityId, aTypeId, bcseverity, scseverity, ignoreinfo, lineNumber, |
428 fqname, aIdentityId, aTypeId, bcseverity, scseverity, ignoreinfo, lineNumber,issueloc, |
437 compareFileName, ""); |
429 compareFileName, ""); |
438 } |
430 } |
439 else |
431 else |
440 { |
432 { |
441 this->iReport.addIssue(compareFileName, |
433 this->iReport.addIssue(compareFileName, |
442 fqname, aIdentityId, aTypeId, bcseverity, scseverity, ignoreinfo, lineNumber, |
434 fqname, aIdentityId, aTypeId, bcseverity, scseverity, ignoreinfo, lineNumber,issueloc, |
443 filename, ""); |
435 filename, ""); |
444 } |
436 } |
445 } |
437 } |
446 } |
438 } |