diff --git a/.github/workflows/code_quality.yml b/.github/workflows/code_quality.yml index 30ca6e6..ebb5e3c 100644 --- a/.github/workflows/code_quality.yml +++ b/.github/workflows/code_quality.yml @@ -16,11 +16,14 @@ jobs: pull-requests: write checks: write steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit fetch-depth: 0 # a full history is required for pull request analysis - name: 'Qodana Scan' uses: JetBrains/qodana-action@v2024.1 + with: + args: + --compile-commands qodana/compile_commands.json env: QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a56afb9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +libteams.so +libteams-personal.so +build/ diff --git a/qodana.yaml b/qodana.yaml new file mode 100644 index 0000000..352ce23 --- /dev/null +++ b/qodana.yaml @@ -0,0 +1,3 @@ +version: "1.0" +linter: jetbrains/qodana-clang:2024.1-eap +bootstrap: sudo apt-get update; sudo apt-get install -y libglib2.0-dev libjson-glib-dev gettext; sudo apt download libpurple0 libpurple-dev; sudo dpkg --force-depends -i libpurple0*.deb libpurple-dev*.deb diff --git a/qodana/compile_commands.json b/qodana/compile_commands.json new file mode 100644 index 0000000..78ddbcb --- /dev/null +++ b/qodana/compile_commands.json @@ -0,0 +1,638 @@ +[ + { + "arguments": [ + "/usr/bin/cc", + "-c", + "-fPIC", + "-O2", + "-g", + "-pipe", + "-pthread", + "-I/usr/include/libpurple", + "-I/usr/include/json-glib-1.0", + "-I/usr/include/libmount", + "-I/usr/include/blkid", + "-I/usr/include/glib-2.0", + "-I/usr/lib/x86_64-linux-gnu/glib-2.0/include", + "-Ipurple2compat", + "-g", + "-ggdb", + "-o", + "libteams.so", + "libteams.c" + ], + "directory": "/data/project/", + "file": "/data/project/libteams.c", + "output": "/data/project/libteams.so" + }, + { + "arguments": [ + "/usr/bin/cc", + "-c", + "-fPIC", + "-O2", + "-g", + "-pipe", + "-pthread", + "-I/usr/include/libpurple", + "-I/usr/include/json-glib-1.0", + "-I/usr/include/libmount", + "-I/usr/include/blkid", + "-I/usr/include/glib-2.0", + "-I/usr/lib/x86_64-linux-gnu/glib-2.0/include", + "-Ipurple2compat", + "-g", + "-ggdb", + "-o", + "libteams.so", + "teams_connection.c" + ], + "directory": "/data/project/", + "file": "/data/project/teams_connection.c", + "output": "/data/project/libteams.so" + }, + { + "arguments": [ + "/usr/bin/cc", + "-c", + "-fPIC", + "-O2", + "-g", + "-pipe", + "-pthread", + "-I/usr/include/libpurple", + "-I/usr/include/json-glib-1.0", + "-I/usr/include/libmount", + "-I/usr/include/blkid", + "-I/usr/include/glib-2.0", + "-I/usr/lib/x86_64-linux-gnu/glib-2.0/include", + "-Ipurple2compat", + "-g", + "-ggdb", + "-o", + "libteams.so", + "teams_contacts.c" + ], + "directory": "/data/project/", + "file": "/data/project/teams_contacts.c", + "output": "/data/project/libteams.so" + }, + { + "arguments": [ + "/usr/bin/cc", + "-c", + "-fPIC", + "-O2", + "-g", + "-pipe", + "-pthread", + "-I/usr/include/libpurple", + "-I/usr/include/json-glib-1.0", + "-I/usr/include/libmount", + "-I/usr/include/blkid", + "-I/usr/include/glib-2.0", + "-I/usr/lib/x86_64-linux-gnu/glib-2.0/include", + "-Ipurple2compat", + "-g", + "-ggdb", + "-o", + "libteams.so", + "teams_login.c" + ], + "directory": "/data/project/", + "file": "/data/project/teams_login.c", + "output": "/data/project/libteams.so" + }, + { + "arguments": [ + "/usr/bin/cc", + "-c", + "-fPIC", + "-O2", + "-g", + "-pipe", + "-pthread", + "-I/usr/include/libpurple", + "-I/usr/include/json-glib-1.0", + "-I/usr/include/libmount", + "-I/usr/include/blkid", + "-I/usr/include/glib-2.0", + "-I/usr/lib/x86_64-linux-gnu/glib-2.0/include", + "-Ipurple2compat", + "-g", + "-ggdb", + "-o", + "libteams.so", + "teams_messages.c" + ], + "directory": "/data/project/", + "file": "/data/project/teams_messages.c", + "output": "/data/project/libteams.so" + }, + { + "arguments": [ + "/usr/bin/cc", + "-c", + "-fPIC", + "-O2", + "-g", + "-pipe", + "-pthread", + "-I/usr/include/libpurple", + "-I/usr/include/json-glib-1.0", + "-I/usr/include/libmount", + "-I/usr/include/blkid", + "-I/usr/include/glib-2.0", + "-I/usr/lib/x86_64-linux-gnu/glib-2.0/include", + "-Ipurple2compat", + "-g", + "-ggdb", + "-o", + "libteams.so", + "teams_util.c" + ], + "directory": "/data/project/", + "file": "/data/project/teams_util.c", + "output": "/data/project/libteams.so" + }, + { + "arguments": [ + "/usr/bin/cc", + "-c", + "-fPIC", + "-O2", + "-g", + "-pipe", + "-pthread", + "-I/usr/include/libpurple", + "-I/usr/include/json-glib-1.0", + "-I/usr/include/libmount", + "-I/usr/include/blkid", + "-I/usr/include/glib-2.0", + "-I/usr/lib/x86_64-linux-gnu/glib-2.0/include", + "-Ipurple2compat", + "-g", + "-ggdb", + "-o", + "libteams.so", + "purple-websocket.c" + ], + "directory": "/data/project/", + "file": "/data/project/purple-websocket.c", + "output": "/data/project/libteams.so" + }, + { + "arguments": [ + "/usr/bin/cc", + "-c", + "-fPIC", + "-O2", + "-g", + "-pipe", + "-pthread", + "-I/usr/include/libpurple", + "-I/usr/include/json-glib-1.0", + "-I/usr/include/libmount", + "-I/usr/include/blkid", + "-I/usr/include/glib-2.0", + "-I/usr/lib/x86_64-linux-gnu/glib-2.0/include", + "-Ipurple2compat", + "-g", + "-ggdb", + "-o", + "libteams.so", + "teams_trouter.c" + ], + "directory": "/data/project/", + "file": "/data/project/teams_trouter.c", + "output": "/data/project/libteams.so" + }, + { + "arguments": [ + "/usr/bin/cc", + "-c", + "-fPIC", + "-O2", + "-g", + "-pipe", + "-pthread", + "-I/usr/include/libpurple", + "-I/usr/include/json-glib-1.0", + "-I/usr/include/libmount", + "-I/usr/include/blkid", + "-I/usr/include/glib-2.0", + "-I/usr/lib/x86_64-linux-gnu/glib-2.0/include", + "-Ipurple2compat", + "-g", + "-ggdb", + "-o", + "libteams.so", + "teams_cards.c" + ], + "directory": "/data/project/", + "file": "/data/project/teams_cards.c", + "output": "/data/project/libteams.so" + }, + { + "arguments": [ + "/usr/bin/cc", + "-c", + "-fPIC", + "-O2", + "-g", + "-pipe", + "-pthread", + "-I/usr/include/libpurple", + "-I/usr/include/json-glib-1.0", + "-I/usr/include/libmount", + "-I/usr/include/blkid", + "-I/usr/include/glib-2.0", + "-I/usr/lib/x86_64-linux-gnu/glib-2.0/include", + "-Ipurple2compat", + "-g", + "-ggdb", + "-o", + "libteams.so", + "markdown.c" + ], + "directory": "/data/project/", + "file": "/data/project/markdown.c", + "output": "/data/project/libteams.so" + }, + { + "arguments": [ + "/usr/bin/cc", + "-c", + "-fPIC", + "-O2", + "-g", + "-pipe", + "-pthread", + "-I/usr/include/libpurple", + "-I/usr/include/json-glib-1.0", + "-I/usr/include/libmount", + "-I/usr/include/blkid", + "-I/usr/include/glib-2.0", + "-I/usr/lib/x86_64-linux-gnu/glib-2.0/include", + "-Ipurple2compat", + "-g", + "-ggdb", + "-o", + "libteams.so", + "purple2compat/http.c" + ], + "directory": "/data/project/", + "file": "/data/project/purple2compat/http.c", + "output": "/data/project/libteams.so" + }, + { + "arguments": [ + "/usr/bin/cc", + "-c", + "-fPIC", + "-O2", + "-g", + "-pipe", + "-pthread", + "-I/usr/include/libpurple", + "-I/usr/include/json-glib-1.0", + "-I/usr/include/libmount", + "-I/usr/include/blkid", + "-I/usr/include/glib-2.0", + "-I/usr/lib/x86_64-linux-gnu/glib-2.0/include", + "-Ipurple2compat", + "-g", + "-ggdb", + "-o", + "libteams.so", + "purple2compat/purple-socket.c" + ], + "directory": "/data/project/", + "file": "/data/project/purple2compat/purple-socket.c", + "output": "/data/project/libteams.so" + }, + { + "arguments": [ + "/usr/bin/cc", + "-c", + "-fPIC", + "-O2", + "-g", + "-pipe", + "-DENABLE_TEAMS_PERSONAL", + "-pthread", + "-I/usr/include/libpurple", + "-I/usr/include/json-glib-1.0", + "-I/usr/include/libmount", + "-I/usr/include/blkid", + "-I/usr/include/glib-2.0", + "-I/usr/lib/x86_64-linux-gnu/glib-2.0/include", + "-Ipurple2compat", + "-g", + "-ggdb", + "-o", + "libteams-personal.so", + "libteams.c" + ], + "directory": "/data/project/", + "file": "/data/project/libteams.c", + "output": "/data/project/libteams-personal.so" + }, + { + "arguments": [ + "/usr/bin/cc", + "-c", + "-fPIC", + "-O2", + "-g", + "-pipe", + "-DENABLE_TEAMS_PERSONAL", + "-pthread", + "-I/usr/include/libpurple", + "-I/usr/include/json-glib-1.0", + "-I/usr/include/libmount", + "-I/usr/include/blkid", + "-I/usr/include/glib-2.0", + "-I/usr/lib/x86_64-linux-gnu/glib-2.0/include", + "-Ipurple2compat", + "-g", + "-ggdb", + "-o", + "libteams-personal.so", + "teams_connection.c" + ], + "directory": "/data/project/", + "file": "/data/project/teams_connection.c", + "output": "/data/project/libteams-personal.so" + }, + { + "arguments": [ + "/usr/bin/cc", + "-c", + "-fPIC", + "-O2", + "-g", + "-pipe", + "-DENABLE_TEAMS_PERSONAL", + "-pthread", + "-I/usr/include/libpurple", + "-I/usr/include/json-glib-1.0", + "-I/usr/include/libmount", + "-I/usr/include/blkid", + "-I/usr/include/glib-2.0", + "-I/usr/lib/x86_64-linux-gnu/glib-2.0/include", + "-Ipurple2compat", + "-g", + "-ggdb", + "-o", + "libteams-personal.so", + "teams_contacts.c" + ], + "directory": "/data/project/", + "file": "/data/project/teams_contacts.c", + "output": "/data/project/libteams-personal.so" + }, + { + "arguments": [ + "/usr/bin/cc", + "-c", + "-fPIC", + "-O2", + "-g", + "-pipe", + "-DENABLE_TEAMS_PERSONAL", + "-pthread", + "-I/usr/include/libpurple", + "-I/usr/include/json-glib-1.0", + "-I/usr/include/libmount", + "-I/usr/include/blkid", + "-I/usr/include/glib-2.0", + "-I/usr/lib/x86_64-linux-gnu/glib-2.0/include", + "-Ipurple2compat", + "-g", + "-ggdb", + "-o", + "libteams-personal.so", + "teams_login.c" + ], + "directory": "/data/project/", + "file": "/data/project/teams_login.c", + "output": "/data/project/libteams-personal.so" + }, + { + "arguments": [ + "/usr/bin/cc", + "-c", + "-fPIC", + "-O2", + "-g", + "-pipe", + "-DENABLE_TEAMS_PERSONAL", + "-pthread", + "-I/usr/include/libpurple", + "-I/usr/include/json-glib-1.0", + "-I/usr/include/libmount", + "-I/usr/include/blkid", + "-I/usr/include/glib-2.0", + "-I/usr/lib/x86_64-linux-gnu/glib-2.0/include", + "-Ipurple2compat", + "-g", + "-ggdb", + "-o", + "libteams-personal.so", + "teams_messages.c" + ], + "directory": "/data/project/", + "file": "/data/project/teams_messages.c", + "output": "/data/project/libteams-personal.so" + }, + { + "arguments": [ + "/usr/bin/cc", + "-c", + "-fPIC", + "-O2", + "-g", + "-pipe", + "-DENABLE_TEAMS_PERSONAL", + "-pthread", + "-I/usr/include/libpurple", + "-I/usr/include/json-glib-1.0", + "-I/usr/include/libmount", + "-I/usr/include/blkid", + "-I/usr/include/glib-2.0", + "-I/usr/lib/x86_64-linux-gnu/glib-2.0/include", + "-Ipurple2compat", + "-g", + "-ggdb", + "-o", + "libteams-personal.so", + "teams_util.c" + ], + "directory": "/data/project/", + "file": "/data/project/teams_util.c", + "output": "/data/project/libteams-personal.so" + }, + { + "arguments": [ + "/usr/bin/cc", + "-c", + "-fPIC", + "-O2", + "-g", + "-pipe", + "-DENABLE_TEAMS_PERSONAL", + "-pthread", + "-I/usr/include/libpurple", + "-I/usr/include/json-glib-1.0", + "-I/usr/include/libmount", + "-I/usr/include/blkid", + "-I/usr/include/glib-2.0", + "-I/usr/lib/x86_64-linux-gnu/glib-2.0/include", + "-Ipurple2compat", + "-g", + "-ggdb", + "-o", + "libteams-personal.so", + "purple-websocket.c" + ], + "directory": "/data/project/", + "file": "/data/project/purple-websocket.c", + "output": "/data/project/libteams-personal.so" + }, + { + "arguments": [ + "/usr/bin/cc", + "-c", + "-fPIC", + "-O2", + "-g", + "-pipe", + "-DENABLE_TEAMS_PERSONAL", + "-pthread", + "-I/usr/include/libpurple", + "-I/usr/include/json-glib-1.0", + "-I/usr/include/libmount", + "-I/usr/include/blkid", + "-I/usr/include/glib-2.0", + "-I/usr/lib/x86_64-linux-gnu/glib-2.0/include", + "-Ipurple2compat", + "-g", + "-ggdb", + "-o", + "libteams-personal.so", + "teams_trouter.c" + ], + "directory": "/data/project/", + "file": "/data/project/teams_trouter.c", + "output": "/data/project/libteams-personal.so" + }, + { + "arguments": [ + "/usr/bin/cc", + "-c", + "-fPIC", + "-O2", + "-g", + "-pipe", + "-DENABLE_TEAMS_PERSONAL", + "-pthread", + "-I/usr/include/libpurple", + "-I/usr/include/json-glib-1.0", + "-I/usr/include/libmount", + "-I/usr/include/blkid", + "-I/usr/include/glib-2.0", + "-I/usr/lib/x86_64-linux-gnu/glib-2.0/include", + "-Ipurple2compat", + "-g", + "-ggdb", + "-o", + "libteams-personal.so", + "teams_cards.c" + ], + "directory": "/data/project/", + "file": "/data/project/teams_cards.c", + "output": "/data/project/libteams-personal.so" + }, + { + "arguments": [ + "/usr/bin/cc", + "-c", + "-fPIC", + "-O2", + "-g", + "-pipe", + "-DENABLE_TEAMS_PERSONAL", + "-pthread", + "-I/usr/include/libpurple", + "-I/usr/include/json-glib-1.0", + "-I/usr/include/libmount", + "-I/usr/include/blkid", + "-I/usr/include/glib-2.0", + "-I/usr/lib/x86_64-linux-gnu/glib-2.0/include", + "-Ipurple2compat", + "-g", + "-ggdb", + "-o", + "libteams-personal.so", + "markdown.c" + ], + "directory": "/data/project/", + "file": "/data/project/markdown.c", + "output": "/data/project/libteams-personal.so" + }, + { + "arguments": [ + "/usr/bin/cc", + "-c", + "-fPIC", + "-O2", + "-g", + "-pipe", + "-DENABLE_TEAMS_PERSONAL", + "-pthread", + "-I/usr/include/libpurple", + "-I/usr/include/json-glib-1.0", + "-I/usr/include/libmount", + "-I/usr/include/blkid", + "-I/usr/include/glib-2.0", + "-I/usr/lib/x86_64-linux-gnu/glib-2.0/include", + "-Ipurple2compat", + "-g", + "-ggdb", + "-o", + "libteams-personal.so", + "purple2compat/http.c" + ], + "directory": "/data/project/", + "file": "/data/project/purple2compat/http.c", + "output": "/data/project/libteams-personal.so" + }, + { + "arguments": [ + "/usr/bin/cc", + "-c", + "-fPIC", + "-O2", + "-g", + "-pipe", + "-DENABLE_TEAMS_PERSONAL", + "-pthread", + "-I/usr/include/libpurple", + "-I/usr/include/json-glib-1.0", + "-I/usr/include/libmount", + "-I/usr/include/blkid", + "-I/usr/include/glib-2.0", + "-I/usr/lib/x86_64-linux-gnu/glib-2.0/include", + "-Ipurple2compat", + "-g", + "-ggdb", + "-o", + "libteams-personal.so", + "purple2compat/purple-socket.c" + ], + "directory": "/data/project/", + "file": "/data/project/purple2compat/purple-socket.c", + "output": "/data/project/libteams-personal.so" + } + ] \ No newline at end of file