From 581b4b3926a51b1e8c1d50eb3ba2c3e85eb2c9a5 Mon Sep 17 00:00:00 2001 From: jorenchik Date: Sun, 17 Nov 2024 18:38:23 +0200 Subject: [PATCH] static analysis script Removed some files --- memorybase/another_error.mdem | 6 +++++- memorybase/hello.mdem | 28 ++++++++++++++++++++++++---- run_clang_tidy_test.py | 12 ++++++++++++ src/.vscode/launch.json | 26 -------------------------- src/qtapp/main.cpp | 1 + 5 files changed, 42 insertions(+), 31 deletions(-) create mode 100644 run_clang_tidy_test.py delete mode 100644 src/.vscode/launch.json diff --git a/memorybase/another_error.mdem b/memorybase/another_error.mdem index 78b38d0..e5ad025 100644 --- a/memorybase/another_error.mdem +++ b/memorybase/another_error.mdem @@ -1,4 +1,8 @@ +- iofhweio > + - foiew: + -^ ifoejwof + - iofhweio > -foiew: - -^ ifoejwof + - ifoejwof diff --git a/memorybase/hello.mdem b/memorybase/hello.mdem index 95eba12..061538b 100644 --- a/memorybase/hello.mdem +++ b/memorybase/hello.mdem @@ -1,4 +1,24 @@ -- [cap_riga] 1 What is the capital of Latvia? > - - Riga -- [cap_riga] 2 What is the capital of Latvia? > - - Riga +17.11.2024 17\:51 + +- Mans secības jautājums? > + -^ Pirmais el + -^ Otrais el + -^ Trešais el + +- [10.50] Grupas jaut > + - Grupa X1: + - Grupa A: + - Elements 1 + - Elements 2 + +- [2.12] Izvēles jaut > + + Element A + + Element B + +- Mans jautājums > + -^ Mana atbilde + -^ Tas ir order jautājums \:)) + +- 1 What is the capital of Latvia? > + - Riga + \ No newline at end of file diff --git a/run_clang_tidy_test.py b/run_clang_tidy_test.py new file mode 100644 index 0000000..51a668c --- /dev/null +++ b/run_clang_tidy_test.py @@ -0,0 +1,12 @@ +import os +import subprocess + +directory = "src" +extensions = (".cpp", ".h") + +for root, _, files in os.walk(directory): + for file in files: + if file.endswith(extensions): + filepath = os.path.join(root, file) + print("Analizē failu: ", filepath) + subprocess.run(["clang-tidy", filepath, "-p", "./Debug/src/transpiler", "-checks='clang-analyzer-*'"]) diff --git a/src/.vscode/launch.json b/src/.vscode/launch.json deleted file mode 100644 index 3098692..0000000 --- a/src/.vscode/launch.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "name": "Launch Package", - "type": "go", - "request": "launch", - "mode": "auto", - "program": "${fileDirname}" - }, - { - "name": "Debug with Build Flags", - "type": "go", - "request": "launch", - "mode": "debug", - "program": "${workspaceFolder}/mdemory-app-qt/main.go", - // "buildFlags": "-gcflags='all=-N -l'", - "args": [], - "env": {}, - "cwd": "${workspaceFolder}" - } - ] -} \ No newline at end of file diff --git a/src/qtapp/main.cpp b/src/qtapp/main.cpp index d90f912..b8d6a61 100644 --- a/src/qtapp/main.cpp +++ b/src/qtapp/main.cpp @@ -6,6 +6,7 @@ int initApp(int argc, char *argv[]) { auto *app = new QApplication(argc, argv); initMdemListWindow(); app->exec(); + delete app; return 0; }