| 31 | } |
| 32 | |
| 33 | std::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 | |
| 64 | int format(lua_State *L) { |
| 65 | int top = lua_gettop(L); |
no outgoing calls
no test coverage detected