diff options
author | bloodstalker <thabogre@gmail.com> | 2018-09-27 08:41:14 +0000 |
---|---|---|
committer | bloodstalker <thabogre@gmail.com> | 2018-09-27 08:41:14 +0000 |
commit | 7abb76507eae14c5baf8e3b8cde4ee4ea8a22501 (patch) | |
tree | ccfb9af87dea1ccf8b3f9eff5f5b9a9197df0f3b /m0/mutator_report.cpp | |
parent | it's working for the most part, the getter methods are also registering light... (diff) | |
download | mutator-7abb76507eae14c5baf8e3b8cde4ee4ea8a22501.tar.gz mutator-7abb76507eae14c5baf8e3b8cde4ee4ea8a22501.zip |
did some code cleanup on m0 and bruiser, now you can specify report paths for m0, wip of dedrecating mutator.sh and mutator.py
Diffstat (limited to '')
-rw-r--r-- | m0/mutator_report.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/m0/mutator_report.cpp b/m0/mutator_report.cpp index 1e0459f..3b6a2d3 100644 --- a/m0/mutator_report.cpp +++ b/m0/mutator_report.cpp @@ -69,8 +69,7 @@ namespace Devi { /************************************************end of XMLReportBase*************************************************/ /*********************************************************************************************************************/ /******************************************************XMLReport******************************************************/ -XMLReport::XMLReport() -{ + XMLReport::XMLReport() { RootPointer = XMLReportDoc.NewElement("mutator:Report"); RootPointer->SetAttribute("xmlns:mutator", "http://www.w3.org/2001/XMLSchema"); } @@ -176,7 +175,7 @@ bool XMLReport::isReportEmpty(void) return false; } -void XMLReport::SaveReport(void) +void XMLReport::SaveReport(std::string savepath) { if(this->isReportEmpty()) { @@ -185,7 +184,7 @@ void XMLReport::SaveReport(void) XMLReportDoc.InsertEndChild(RootPointer); - XMLError XMLErrorResult = XMLReportDoc.SaveFile("./misrareport.xml"); + XMLError XMLErrorResult = XMLReportDoc.SaveFile(savepath.c_str()); if (XMLErrorResult != XML_SUCCESS) { @@ -197,9 +196,9 @@ void XMLReport::SaveReport(void) /*****************************************************JSONReport******************************************************/ JSONReport::JSONReport() {} -void JSONReport::JSONCreateReport(void) +void JSONReport::JSONCreateReport(std::string outpath) { - JSONRepFile.open("./test/misrareport.json", std::ios::out); + JSONRepFile.open(outpath, std::ios::out); } void JSONReport::JSONAddElement(ASTContext* ASTC, SourceLocation SL, std::string MisraRule, std::string Description) |