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

Method Check

CodeFormat/src/LuaCheck.cpp:11–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9#include <iostream>
10
11bool 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
29void DiagnosticInspection(std::string_view message, TextRange range, LuaSource &file,
30 std::string_view path) {

Callers 1

mainFunction · 0.45

Calls 5

GetWorkModeMethod · 0.80
GetInputPathMethod · 0.80
GetInputTextMethod · 0.80
GetStyleMethod · 0.80
formatFunction · 0.50

Tested by

no test coverage detected