13 : m_mode(
Mode::Immediate) {
34 std::lock_guard<std::mutex> lock(
m_mutex);
45 +
":" + std::to_string(diag.
line)
46 +
":" + std::to_string(diag.
column);
52 throw std::runtime_error(message);
57 const std::string &msg,
66 std::lock_guard<std::mutex> lock(
m_mutex);
75 std::lock_guard<std::mutex> lock(
m_mutex);
84 std::lock_guard<std::mutex> lock(
m_mutex);
94 std::lock_guard<std::mutex> lock(
m_mutex);
110 std::lock_guard<std::mutex> lock(
m_mutex);
146 if (!fileStream.is_open()) {
151 if (!std::getline(fileStream, lineStr)) {
158 result += std::wstring(col - 1, L
' ') + L
"^";
size_t warningCount() const
const std::vector< Diagnostic > & getDiagnostics() const
yoi::wstr m_currentFilePath
yoi::wstr getLineHint(const yoi::wstr &file, yoi::indexT line, yoi::indexT col) const
const yoi::wstr & getCurrentFilePath() const
void setCurrentFilePath(const yoi::wstr &path)
Set the file path for diagnostics reported via the convenience overload.
void setCategorySeverity(const std::string &label, DiagnosticSeverity severity)
size_t errorCount() const
void initDefaultCategorySeverity()
void report(const Diagnostic &diag)
DiagnosticSeverity getCategorySeverity(const std::string &label) const
Get the effective severity for a legacy category label.
std::map< std::string, DiagnosticSeverity > m_categorySeverityOverrides
std::vector< Diagnostic > m_diagnostics
std::string wstring2string(const std::wstring &v)
std::wstring string2wstring(const std::string &v)
DiagnosticSeverity severity