@@ -155,11 +155,10 @@ bool LuaFormat::Check(std::string_view workspace, std::shared_ptr<CodeSpellCheck
155155 {
156156 auto errors = _parser->GetErrors ();
157157
158- std::cerr << Util::format (" Check {}\t {} error" , inputFile, errors.size ()) << std::endl;
159-
158+ std::cout << Util::format (" Check {}\t {} error" , inputFile, errors.size ()) << std::endl;
159+ auto luaFile = _parser-> GetLuaFile ();
160160 for (auto & error : errors)
161161 {
162- auto luaFile = _parser->GetLuaFile ();
163162 DiagnosisInspection (error.ErrorMessage , error.ErrorRange , luaFile, inputFile);
164163 }
165164
@@ -196,7 +195,7 @@ bool LuaFormat::Check(std::string_view workspace, std::shared_ptr<CodeSpellCheck
196195 auto diagnosis = ctx.GetDiagnosisInfos ();
197196 if (!diagnosis.empty ())
198197 {
199- std::cerr << Util::format (" Check {}\t {} warning" , inputFile, diagnosis.size ()) << std::endl;
198+ std::cout << Util::format (" Check {}\t {} warning" , inputFile, diagnosis.size ()) << std::endl;
200199
201200 for (auto & d : diagnosis)
202201 {
@@ -222,6 +221,6 @@ void LuaFormat::DiagnosisInspection(std::string_view message, TextRange range, s
222221 auto startChar = file->GetColumn (range.StartOffset );
223222 auto endLine = file->GetLine (range.EndOffset );
224223 auto endChar = file->GetColumn (range.EndOffset );
225- std::cerr << Util::format (" {}({}:{} to {}:{}): {}" , path, startLine + 1 , startChar, endLine + 1 , endChar,
224+ std::cout << Util::format (" \t {}({}:{} to {}:{}): {}" , path, startLine + 1 , startChar, endLine + 1 , endChar,
226225 message) << std::endl;
227226}
0 commit comments