| 9 | #include <iostream> |
| 10 | |
| 11 | bool LuaCheck::Check(const FormatContext &context) { |
| 12 | switch (context.GetWorkMode()) { |
| 13 | case WorkMode::File: |
| 14 | case WorkMode::Stdin: { |
| 15 | auto inputPath = context.GetInputPath(); |
| 16 | if (CheckSingleFile(context, inputPath, std::move(context.GetInputText()), context.GetStyle(inputPath))) { |
| 17 | std::cerr << util::format("Check {} ... ok", inputPath) << std::endl; |
| 18 | return true; |
| 19 | } |
| 20 | break; |
| 21 | } |
| 22 | case WorkMode::Workspace: { |
| 23 | return CheckWorkspace(context); |
| 24 | } |
| 25 | } |
| 26 | return false; |
| 27 | } |
| 28 | |
| 29 | void DiagnosticInspection(std::string_view message, TextRange range, LuaSource &file, |
| 30 | std::string_view path) { |
no test coverage detected