diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index 0fdd496bb..c9d7b7a05 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -36,6 +36,15 @@ jobs: run: scripts/check_dilate.sh release data - name: Shellcheck run: find . -type f -name '*.sh' -print0 | xargs -0 shellcheck + - name: Check log error case + run: | + if grep -Eqr '(msg|Print).*\(.*"[Ee]rror:' src/; + then + echo "Expected log errors to be in this format 'ERROR: error message'" + echo "Found these non uppercased log errors:" + grep -Er '(msg|Print).*\(.*"[Ee]rror:' src/ + exit 1 + fi - name: Pylint run: | pylint --version diff --git a/src/engine/client/backend/opengl/backend_opengl.cpp b/src/engine/client/backend/opengl/backend_opengl.cpp index a3aa460d1..82d399a83 100644 --- a/src/engine/client/backend/opengl/backend_opengl.cpp +++ b/src/engine/client/backend/opengl/backend_opengl.cpp @@ -190,7 +190,7 @@ void CCommandProcessorFragment_OpenGL::SetState(const CCommandBuffer::SState &St } else { - dbg_msg("opengl", "Error: this call should not happen."); + dbg_msg("opengl", "ERROR: this call should not happen."); } } } diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp index 6b183e1fc..65ff9ea08 100644 --- a/src/engine/client/client.cpp +++ b/src/engine/client/client.cpp @@ -3693,7 +3693,7 @@ void CClient::Con_SaveReplay(IConsole::IResult *pResult, void *pUserData) { int Length = pResult->GetInteger(0); if(Length <= 0) - pSelf->m_pConsole->Print(IConsole::OUTPUT_LEVEL_STANDARD, "replay", "Error: length must be greater than 0 second."); + pSelf->m_pConsole->Print(IConsole::OUTPUT_LEVEL_STANDARD, "replay", "ERROR: length must be greater than 0 second."); else pSelf->SaveReplay(Length); } @@ -3711,9 +3711,9 @@ void CClient::SaveReplay(const int Length) } if(!DemoRecorder(RECORDER_REPLAYS)->IsRecording()) - m_pConsole->Print(IConsole::OUTPUT_LEVEL_STANDARD, "replay", "Error: demorecorder isn't recording. Try to rejoin to fix that."); + m_pConsole->Print(IConsole::OUTPUT_LEVEL_STANDARD, "replay", "ERROR: demorecorder isn't recording. Try to rejoin to fix that."); else if(DemoRecorder(RECORDER_REPLAYS)->Length() < 1) - m_pConsole->Print(IConsole::OUTPUT_LEVEL_STANDARD, "replay", "Error: demorecorder isn't recording for at least 1 second."); + m_pConsole->Print(IConsole::OUTPUT_LEVEL_STANDARD, "replay", "ERROR: demorecorder isn't recording for at least 1 second."); else { // First we stop the recorder to slice correctly the demo after