Skip to content

Commit 717d459

Browse files
committed
remove any unneccessary changes
1 parent e789c06 commit 717d459

3 files changed

Lines changed: 1 addition & 14 deletions

File tree

cli/cppcheckexecutor.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@
2323
#include "cppcheckexecutor.h"
2424

2525
#include "analyzerinfo.h"
26-
#include "check.h"
2726
#include "checkersreport.h"
28-
#include "checkunusedfunctions.h"
2927
#include "cmdlinelogger.h"
3028
#include "cmdlineparser.h"
3129
#include "color.h"
@@ -35,11 +33,9 @@
3533
#include "errortypes.h"
3634
#include "filesettings.h"
3735
#include "json.h"
38-
#include "preprocessor.h"
3936
#include "settings.h"
4037
#include "singleexecutor.h"
4138
#include "suppressions.h"
42-
#include "tokenize.h"
4339
#include "utils.h"
4440

4541
#if defined(HAS_THREADING_MODEL_THREAD)
@@ -59,7 +55,6 @@
5955
#include <iostream>
6056
#include <list>
6157
#include <map>
62-
#include <regex>
6358
#include <set>
6459
#include <sstream>
6560
#include <unordered_set>

lib/errorlogger.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
#include <string>
4040
#include <unordered_map>
4141
#include <utility>
42-
#include <regex>
4342

4443
#include "xml.h"
4544

@@ -213,7 +212,6 @@ ErrorMessage::ErrorMessage(const tinyxml2::XMLElement * const errmsg)
213212
}
214213
}
215214

216-
// Convert instance-specific messages to generic ones
217215
void ErrorMessage::setmsg(const std::string &msg)
218216
{
219217
// If a message ends to a '\n' and contains only a one '\n'
@@ -495,9 +493,6 @@ std::string ErrorMessage::toXML() const
495493
printer.PushAttribute("classification", classification.c_str());
496494
printer.PushAttribute("msg", fixInvalidChars(mShortMessage).c_str());
497495
printer.PushAttribute("verbose", fixInvalidChars(mVerboseMessage).c_str());
498-
// TODO: Generic message was added for SARIF output format, consider whether to include in XML
499-
// if (!mGenericMessage.empty())
500-
// printer.PushAttribute("generic", fixInvalidChars(mGenericMessage).c_str());
501496
if (cwe.id)
502497
printer.PushAttribute("cwe", cwe.id);
503498
if (hash)

test/cli/helloworld_test.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -377,11 +377,8 @@ def test_sarif():
377377
assert 'security' in res['runs'][0]['tool']['driver']['rules'][0]['properties']['tags']
378378
assert re.match(r'[0-9]+(.[0-9]+)+', res['runs'][0]['tool']['driver']['semanticVersion'])
379379
assert 'level' in res['runs'][0]['tool']['driver']['rules'][0]['defaultConfiguration'] # #13885
380-
# Test that rule description is now the generic mapped description, not instance-specific
381-
assert res['runs'][0]['tool']['driver']['rules'][0]['shortDescription']['text'] == 'Division by zero'
382-
# Test that the result message is still the instance-specific message
380+
assert res['runs'][0]['tool']['driver']['rules'][0]['shortDescription']['text'] == ''
383381
assert res['runs'][0]['results'][0]['message']['text'] == 'Division by zero.'
384-
# Test that problem.severity property exists and is correct
385382
assert res['runs'][0]['tool']['driver']['rules'][0]['properties']['problem.severity'] == 'error'
386383

387384

0 commit comments

Comments
 (0)