MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / DiagnosticInspection

Function DiagnosticInspection

CodeFormat/src/LuaCheck.cpp:29–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27}
28
29void DiagnosticInspection(std::string_view message, TextRange range, LuaSource &file,
30 std::string_view path) {
31 auto startLine = file.GetLine(range.StartOffset);
32 auto startChar = file.GetColumn(range.StartOffset);
33 auto endLine = file.GetLine(range.GetEndOffset());
34 auto endChar = file.GetColumn(range.GetEndOffset());
35 std::cerr << util::format("\t{}({}:{} to {}:{}): {}", path, startLine + 1, startChar, endLine + 1, endChar,
36 message)
37 << std::endl;
38}
39
40nlohmann::json DiagnosticToJson(std::string_view message, TextRange range, LuaSource &file) {
41 auto startLine = file.GetLine(range.StartOffset);

Callers 1

CheckSingleFileMethod · 0.85

Calls 4

GetLineMethod · 0.80
GetColumnMethod · 0.80
formatFunction · 0.50
GetEndOffsetMethod · 0.45

Tested by

no test coverage detected