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

Function GetDiagnosisString

CodeFormatLib/src/CodeFormatLib.cpp:33–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31}
32
33std::string GetDiagnosisString(DiagnosticType type) {
34 switch (type) {
35 case DiagnosticType::MaxLineWidth:
36 return "max-line-width";
37 case DiagnosticType::Indent:
38 return "indent";
39 case DiagnosticType::Align:
40 return "align";
41 case DiagnosticType::Space:
42 return "space";
43 case DiagnosticType::EndWithNewLine:
44 return "end-with-new-line";
45 case DiagnosticType::NameStyle:
46 return "name-style";
47 case DiagnosticType::StatementLineSpace:
48 return "line-space";
49 case DiagnosticType::Spell:
50 return "spell";
51 case DiagnosticType::StringQuote:
52 return "string-quote";
53 case DiagnosticType::Semicolon:
54 return "semicolon";
55 case DiagnosticType::Parentheses:
56 return "parentheses";
57 default: {
58 break;
59 }
60 }
61 return "";
62}
63
64int format(lua_State *L) {
65 int top = lua_gettop(L);

Callers 1

PushDiagnosticToLuaFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected