Cppcheck
Functions
errorlogger.cpp File Reference
#include "errorlogger.h"
#include "color.h"
#include "cppcheck.h"
#include "path.h"
#include "settings.h"
#include "suppressions.h"
#include "token.h"
#include "tokenlist.h"
#include "utils.h"
#include <algorithm>
#include <array>
#include <cassert>
#include <cctype>
#include <cstring>
#include <fstream>
#include <iomanip>
#include <sstream>
#include <string>
#include <unordered_map>
#include <utility>
#include "xml.h"

Go to the source code of this file.

Functions

static void serializeString (std::string &oss, const std::string &str)
 
static void findAndReplace (std::string &source, const std::string &searchFor, const std::string &replaceWith)
 Replace all occurrences of searchFor with replaceWith in the given source. More...
 
static std::string readCode (const std::string &file, int linenr, int column, const char endl[])
 
static void replaceSpecialChars (std::string &source)
 
static void replace (std::string &source, const std::unordered_map< std::string, std::string > &substitutionMap)
 
static void replaceColors (std::string &source)
 
static std::string plistLoc (const char indent[], const ErrorMessage::FileLocation &loc)
 
std::string replaceStr (std::string s, const std::string &from, const std::string &to)
 Replace substring. More...
 
void substituteTemplateFormatStatic (std::string &templateFormat)
 replaces the static parts of the location template More...
 
void substituteTemplateLocationStatic (std::string &templateLocation)
 replaces the static parts of the location template More...
 

Function Documentation

◆ findAndReplace()

static void findAndReplace ( std::string &  source,
const std::string &  searchFor,
const std::string &  replaceWith 
)
static

Replace all occurrences of searchFor with replaceWith in the given source.

Parameters
sourceThe string to modify
searchForWhat should be searched for
replaceWithWhat will replace the found item

Definition at line 533 of file errorlogger.cpp.

Referenced by ErrorMessage::toString().

◆ plistLoc()

static std::string plistLoc ( const char  indent[],
const ErrorMessage::FileLocation loc 
)
static

◆ readCode()

static std::string readCode ( const std::string &  file,
int  linenr,
int  column,
const char  endl[] 
)
static

Definition at line 543 of file errorlogger.cpp.

Referenced by ErrorMessage::toString().

◆ replace()

static void replace ( std::string &  source,
const std::unordered_map< std::string, std::string > &  substitutionMap 
)
static

◆ replaceColors()

static void replaceColors ( std::string &  source)
static

◆ replaceSpecialChars()

static void replaceSpecialChars ( std::string &  source)
static

◆ serializeString()

static void serializeString ( std::string &  oss,
const std::string &  str 
)
static

Definition at line 236 of file errorlogger.cpp.

Referenced by ErrorMessage::serialize().