From cf48ae1cc77cb58cdd4ce4ef3a71700f6b8a3f05 Mon Sep 17 00:00:00 2001 From: InfernalKn1ght Date: Thu, 12 Jun 2025 16:59:18 +0300 Subject: [PATCH 1/5] ci(lint): change settings --- .github/workflows/lint.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 98d78ee4..dda21591 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -2,9 +2,9 @@ name: Code formatting and linting on: push: - branches: [ master ] + branches: [ master, ci-rework ] pull_request: - branches: [ master ] + branches: [ master, ci-rework ] env: BUILD_TYPE: Debug @@ -32,10 +32,12 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: + version: '19' database: 'build' ignore: 'QML|data|.github|build|Engine/3rdparty|Engine/shaders|tools' style: 'file' tidy-checks: '' + step-summary: true files-changed-only: false tidy-review: true format-review: true From 2b6e88a8bee1d7b574d306157efb671bd32d3c04 Mon Sep 17 00:00:00 2001 From: InfernalKn1ght Date: Thu, 12 Jun 2025 17:04:10 +0300 Subject: [PATCH 2/5] style: apply format changes --- ImagePlugin/QtOpenSRImagePlugin.cpp | 4 +++- Ranger/GILoader.cpp | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ImagePlugin/QtOpenSRImagePlugin.cpp b/ImagePlugin/QtOpenSRImagePlugin.cpp index 07d02d3b..3cd4af8d 100644 --- a/ImagePlugin/QtOpenSRImagePlugin.cpp +++ b/ImagePlugin/QtOpenSRImagePlugin.cpp @@ -110,7 +110,9 @@ QImageIOHandler *QtOpenSRImagePlugin::create(QIODevice *device, const QByteArray QStringList QtOpenSRImagePlugin::keys() const { - return QStringList() << "gi" << "gai" << "hai" << "psd"; + QStringList keys; + keys << "gi" << "gai" << "hai" << "psd"; + return keys; } } // namespace OpenSR diff --git a/Ranger/GILoader.cpp b/Ranger/GILoader.cpp index 0e3388ad..823de0aa 100644 --- a/Ranger/GILoader.cpp +++ b/Ranger/GILoader.cpp @@ -100,7 +100,7 @@ void drawR5G6B5(QImage &result, int x, int y, QIODevice *dev) quint16 color{}; dev->read((char *)&color, 2); *((uint32_t *)row) = (0xff000000) | (((color >> 11) & 0x1f) << 19) | (((color >> 5) & 0x3f) << 10) | - (((color) & 0x1f) << 3); + ((color & 0x1f) << 3); row += 4; cnt--; @@ -108,7 +108,7 @@ void drawR5G6B5(QImage &result, int x, int y, QIODevice *dev) { dev->read((char *)&color, 2); *((uint32_t *)row) = (0xff000000) | (((color >> 11) & 0x1f) << 19) | (((color >> 5) & 0x3f) << 10) | - (((color) & 0x1f) << 3); + ((color & 0x1f) << 3); row += 4; cnt--; } From 6938a28b7d16a073e2b40a6229d92ff9d066e985 Mon Sep 17 00:00:00 2001 From: InfernalKn1ght Date: Thu, 12 Jun 2025 17:27:25 +0300 Subject: [PATCH 3/5] style: apply format changes --- World/Planet.h | 2 +- World/Ship.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/World/Planet.h b/World/Planet.h index 39fa029f..f0eb4d21 100644 --- a/World/Planet.h +++ b/World/Planet.h @@ -44,7 +44,7 @@ class OPENSR_WORLD_API PlanetStyle : public Resource struct Data { QString surface, cloud0, cloud1, background; - int radius; + int radius{}; QColor atmosphere; }; diff --git a/World/Ship.h b/World/Ship.h index db7fa757..a00c9336 100644 --- a/World/Ship.h +++ b/World/Ship.h @@ -39,7 +39,7 @@ class OPENSR_WORLD_API ShipStyle : public Resource struct Data { QString texture; - int width; + int width{}; }; int width() const; From 94dc747ca9329f9e1f918d27916db6c430149723 Mon Sep 17 00:00:00 2001 From: InfernalKn1ght Date: Thu, 12 Jun 2025 21:10:00 +0300 Subject: [PATCH 4/5] ci: test format review --- Engine/Engine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Engine/Engine.cpp b/Engine/Engine.cpp index 2036bf42..b00f8966 100644 --- a/Engine/Engine.cpp +++ b/Engine/Engine.cpp @@ -178,7 +178,7 @@ void Engine::showQMLComponent(const QString &url) for (auto root : d->qmlEngine->rootObjects()) { - QMetaObject::invokeMethod(root, "changeScreen", Q_ARG(QVariant, QUrl(url)), Q_ARG(QVariant, QVariantMap())); + QMetaObject::invokeMethod(root, "destroyAndChangeScreen", Q_ARG(QVariant, QUrl(url)), Q_ARG(QVariant, QVariantMap())); } } From 19f551e4d577584c6c14353f95bee866eb335137 Mon Sep 17 00:00:00 2001 From: Dmitry Arzhaev <117383710+InfernalKn1ght@users.noreply.github.com> Date: Thu, 12 Jun 2025 21:31:07 +0300 Subject: [PATCH 5/5] style: apply formatting Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- Engine/Engine.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Engine/Engine.cpp b/Engine/Engine.cpp index b00f8966..42878018 100644 --- a/Engine/Engine.cpp +++ b/Engine/Engine.cpp @@ -178,7 +178,8 @@ void Engine::showQMLComponent(const QString &url) for (auto root : d->qmlEngine->rootObjects()) { - QMetaObject::invokeMethod(root, "destroyAndChangeScreen", Q_ARG(QVariant, QUrl(url)), Q_ARG(QVariant, QVariantMap())); + QMetaObject::invokeMethod(root, "destroyAndChangeScreen", Q_ARG(QVariant, QUrl(url)), + Q_ARG(QVariant, QVariantMap())); } }