Skip to content

Ci test#4

Closed
InfernalKn1ght wants to merge 24 commits into
masterfrom
ci-test
Closed

Ci test#4
InfernalKn1ght wants to merge 24 commits into
masterfrom
ci-test

Conversation

@InfernalKn1ght
Copy link
Copy Markdown
Owner

No description provided.

@github-actions
Copy link
Copy Markdown

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-tidy (v19.1.1) reports: 1 concern(s)
  • tests/World/Ship/TestShip.h:3:10: error: [clang-diagnostic-error]

    'QtTest' file not found

        3 | #include <QtTest>
          |          ^~~~~~~~

Have any feedback or feature suggestions? Share it here.

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cpp-linter Review

Used clang-tidy v19.1.1

Click here for the full clang-tidy patch
diff --git a/tests/World/Ship/TestShip.cpp b/tests/World/Ship/TestShip.cpp
index 7156e2c..d3ebced 100644
--- a/tests/World/Ship/TestShip.cpp
+++ b/tests/World/Ship/TestShip.cpp
@@ -3,0 +4,2 @@
+#include <math.h>
+
@@ -48 +50 @@ void TestShip::testInitTargetAngle_data()
-    const float pi = static_cast<float>(M_PI);
+    const float pi = NAN = static_cast<float>(M_PI);
@@ -214,2 +216,2 @@ void TestShip::testCalcPosition()
-    const bool match = fuzzyEqual(static_cast<float>(result.x()), static_cast<float>(expectedPosition.x())) &&
-                       fuzzyEqual(static_cast<float>(result.y()), static_cast<float>(expectedPosition.y()));
+    const bool match = false = fuzzyEqual(static_cast<float>(result.x()), static_cast<float>(expectedPosition.x())) &&
+                               fuzzyEqual(static_cast<float>(result.y()), static_cast<float>(expectedPosition.y()));
@@ -258 +260 @@ void TestShip::testUpdatePositionMoving()
-    const bool match =
+    const bool match = false =

Used clang-format v19.1.1

No concerns from clang-format.

Have any feedback or feature suggestions? Share it here.

@@ -0,0 +1,30 @@
#pragma once

#include <QtTest>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy diagnostic

tests/World/Ship/TestShip.h:3:10: error: [clang-diagnostic-error]

'QtTest' file not found

    3 | #include <QtTest>
      |          ^~~~~~~~

#include "TestShip.h"
#include "Ship.h"

namespace OpenSR
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy suggestion

Suggested change
namespace OpenSR
#include <math.h>

QTest::addColumn<QPointF>("destination");
QTest::addColumn<float>("expectedAngle");

const float pi = static_cast<float>(M_PI);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy suggestion

Suggested change
const float pi = static_cast<float>(M_PI);
const float pi = NAN = static_cast<float>(M_PI);

Comment on lines +214 to +215
const bool match = fuzzyEqual(static_cast<float>(result.x()), static_cast<float>(expectedPosition.x())) &&
fuzzyEqual(static_cast<float>(result.y()), static_cast<float>(expectedPosition.y()));
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy suggestion

Suggested change
const bool match = fuzzyEqual(static_cast<float>(result.x()), static_cast<float>(expectedPosition.x())) &&
fuzzyEqual(static_cast<float>(result.y()), static_cast<float>(expectedPosition.y()));
const bool match = false = fuzzyEqual(static_cast<float>(result.x()), static_cast<float>(expectedPosition.x())) &&
fuzzyEqual(static_cast<float>(result.y()), static_cast<float>(expectedPosition.y()));

ship.setIsMoving(true);
ship.updatePosition(dt_ms);

const bool match =
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy suggestion

Suggested change
const bool match =
const bool match = false =

@@ -0,0 +1,296 @@
#include "TestShip.h"
#include "Ship.h"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy diagnostic

tests/World/Ship/TestShip.cpp:3:10: error: [clang-diagnostic-error]

'QtTest' file not found

    3 | #include <QtTest>
      |          ^~~~~~~~

@github-actions github-actions Bot dismissed their stale review August 30, 2025 19:59

outdated suggestion

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cpp-linter Review

Used clang-tidy v19.1.1

Click here for the full clang-tidy patch
diff --git a/tests/World/Ship/TestShip.cpp b/tests/World/Ship/TestShip.cpp
index 7156e2c..d3ebced 100644
--- a/tests/World/Ship/TestShip.cpp
+++ b/tests/World/Ship/TestShip.cpp
@@ -3,0 +4,2 @@
+#include <math.h>
+
@@ -48 +50 @@ void TestShip::testInitTargetAngle_data()
-    const float pi = static_cast<float>(M_PI);
+    const float pi = NAN = static_cast<float>(M_PI);
@@ -214,2 +216,2 @@ void TestShip::testCalcPosition()
-    const bool match = fuzzyEqual(static_cast<float>(result.x()), static_cast<float>(expectedPosition.x())) &&
-                       fuzzyEqual(static_cast<float>(result.y()), static_cast<float>(expectedPosition.y()));
+    const bool match = false = fuzzyEqual(static_cast<float>(result.x()), static_cast<float>(expectedPosition.x())) &&
+                               fuzzyEqual(static_cast<float>(result.y()), static_cast<float>(expectedPosition.y()));
@@ -258 +260 @@ void TestShip::testUpdatePositionMoving()
-    const bool match =
+    const bool match = false =

Used clang-format v19.1.1

No concerns from clang-format.

Have any feedback or feature suggestions? Share it here.

@@ -0,0 +1,30 @@
#pragma once

#include <QtTest>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy diagnostic

tests/World/Ship/TestShip.h:3:10: error: [clang-diagnostic-error]

'QtTest' file not found

    3 | #include <QtTest>
      |          ^~~~~~~~

#include "TestShip.h"
#include "Ship.h"

namespace OpenSR
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy suggestion

Suggested change
namespace OpenSR
#include <math.h>

QTest::addColumn<QPointF>("destination");
QTest::addColumn<float>("expectedAngle");

const float pi = static_cast<float>(M_PI);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy suggestion

Suggested change
const float pi = static_cast<float>(M_PI);
const float pi = NAN = static_cast<float>(M_PI);

Comment on lines +214 to +215
const bool match = fuzzyEqual(static_cast<float>(result.x()), static_cast<float>(expectedPosition.x())) &&
fuzzyEqual(static_cast<float>(result.y()), static_cast<float>(expectedPosition.y()));
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy suggestion

Suggested change
const bool match = fuzzyEqual(static_cast<float>(result.x()), static_cast<float>(expectedPosition.x())) &&
fuzzyEqual(static_cast<float>(result.y()), static_cast<float>(expectedPosition.y()));
const bool match = false = fuzzyEqual(static_cast<float>(result.x()), static_cast<float>(expectedPosition.x())) &&
fuzzyEqual(static_cast<float>(result.y()), static_cast<float>(expectedPosition.y()));

ship.setIsMoving(true);
ship.updatePosition(dt_ms);

const bool match =
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy suggestion

Suggested change
const bool match =
const bool match = false =

@@ -0,0 +1,296 @@
#include "TestShip.h"
#include "Ship.h"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy diagnostic

tests/World/Ship/TestShip.cpp:3:10: error: [clang-diagnostic-error]

'QtTest' file not found

    3 | #include <QtTest>
      |          ^~~~~~~~

@github-actions github-actions Bot dismissed their stale review August 30, 2025 20:10

outdated suggestion

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cpp-linter Review

Used clang-tidy v19.1.1

Click here for the full clang-tidy patch
diff --git a/tests/World/Ship/TestShip.cpp b/tests/World/Ship/TestShip.cpp
index 7156e2c..d3ebced 100644
--- a/tests/World/Ship/TestShip.cpp
+++ b/tests/World/Ship/TestShip.cpp
@@ -3,0 +4,2 @@
+#include <math.h>
+
@@ -48 +50 @@ void TestShip::testInitTargetAngle_data()
-    const float pi = static_cast<float>(M_PI);
+    const float pi = NAN = static_cast<float>(M_PI);
@@ -214,2 +216,2 @@ void TestShip::testCalcPosition()
-    const bool match = fuzzyEqual(static_cast<float>(result.x()), static_cast<float>(expectedPosition.x())) &&
-                       fuzzyEqual(static_cast<float>(result.y()), static_cast<float>(expectedPosition.y()));
+    const bool match = false = fuzzyEqual(static_cast<float>(result.x()), static_cast<float>(expectedPosition.x())) &&
+                               fuzzyEqual(static_cast<float>(result.y()), static_cast<float>(expectedPosition.y()));
@@ -258 +260 @@ void TestShip::testUpdatePositionMoving()
-    const bool match =
+    const bool match = false =

Used clang-format v19.1.1

No concerns from clang-format.

Have any feedback or feature suggestions? Share it here.

#include "TestShip.h"
#include "Ship.h"

namespace OpenSR
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy suggestion

Suggested change
namespace OpenSR
#include <math.h>

QTest::addColumn<QPointF>("destination");
QTest::addColumn<float>("expectedAngle");

const float pi = static_cast<float>(M_PI);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy suggestion

Suggested change
const float pi = static_cast<float>(M_PI);
const float pi = NAN = static_cast<float>(M_PI);

Comment on lines +214 to +215
const bool match = fuzzyEqual(static_cast<float>(result.x()), static_cast<float>(expectedPosition.x())) &&
fuzzyEqual(static_cast<float>(result.y()), static_cast<float>(expectedPosition.y()));
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy suggestion

Suggested change
const bool match = fuzzyEqual(static_cast<float>(result.x()), static_cast<float>(expectedPosition.x())) &&
fuzzyEqual(static_cast<float>(result.y()), static_cast<float>(expectedPosition.y()));
const bool match = false = fuzzyEqual(static_cast<float>(result.x()), static_cast<float>(expectedPosition.x())) &&
fuzzyEqual(static_cast<float>(result.y()), static_cast<float>(expectedPosition.y()));

ship.setIsMoving(true);
ship.updatePosition(dt_ms);

const bool match =
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy suggestion

Suggested change
const bool match =
const bool match = false =

@@ -0,0 +1,296 @@
#include "TestShip.h"
#include "Ship.h"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy diagnostic

tests/World/Ship/TestShip.cpp:3:10: error: [clang-diagnostic-error]

'QtTest' file not found

    3 | #include <QtTest>
      |          ^~~~~~~~

@@ -0,0 +1,30 @@
#pragma once

#include <QtTest>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy diagnostic

tests/World/Ship/TestShip.h:3:10: error: [clang-diagnostic-error]

'QtTest' file not found

    3 | #include <QtTest>
      |          ^~~~~~~~

@github-actions github-actions Bot dismissed their stale review August 30, 2025 21:09

outdated suggestion

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cpp-linter Review

Used clang-tidy v19.1.1

Click here for the full clang-tidy patch
diff --git a/tests/World/Ship/TestShip.cpp b/tests/World/Ship/TestShip.cpp
index 7156e2c..d3ebced 100644
--- a/tests/World/Ship/TestShip.cpp
+++ b/tests/World/Ship/TestShip.cpp
@@ -3,0 +4,2 @@
+#include <math.h>
+
@@ -48 +50 @@ void TestShip::testInitTargetAngle_data()
-    const float pi = static_cast<float>(M_PI);
+    const float pi = NAN = static_cast<float>(M_PI);
@@ -214,2 +216,2 @@ void TestShip::testCalcPosition()
-    const bool match = fuzzyEqual(static_cast<float>(result.x()), static_cast<float>(expectedPosition.x())) &&
-                       fuzzyEqual(static_cast<float>(result.y()), static_cast<float>(expectedPosition.y()));
+    const bool match = false = fuzzyEqual(static_cast<float>(result.x()), static_cast<float>(expectedPosition.x())) &&
+                               fuzzyEqual(static_cast<float>(result.y()), static_cast<float>(expectedPosition.y()));
@@ -258 +260 @@ void TestShip::testUpdatePositionMoving()
-    const bool match =
+    const bool match = false =

Used clang-format v19.1.1

No concerns from clang-format.

Have any feedback or feature suggestions? Share it here.

@@ -0,0 +1,30 @@
#pragma once

#include <QtTest>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy diagnostic

tests/World/Ship/TestShip.h:3:10: error: [clang-diagnostic-error]

'QtTest' file not found

    3 | #include <QtTest>
      |          ^~~~~~~~

#include "TestShip.h"
#include "Ship.h"

namespace OpenSR
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy suggestion

Suggested change
namespace OpenSR
#include <math.h>

QTest::addColumn<QPointF>("destination");
QTest::addColumn<float>("expectedAngle");

const float pi = static_cast<float>(M_PI);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy suggestion

Suggested change
const float pi = static_cast<float>(M_PI);
const float pi = NAN = static_cast<float>(M_PI);

Comment on lines +214 to +215
const bool match = fuzzyEqual(static_cast<float>(result.x()), static_cast<float>(expectedPosition.x())) &&
fuzzyEqual(static_cast<float>(result.y()), static_cast<float>(expectedPosition.y()));
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy suggestion

Suggested change
const bool match = fuzzyEqual(static_cast<float>(result.x()), static_cast<float>(expectedPosition.x())) &&
fuzzyEqual(static_cast<float>(result.y()), static_cast<float>(expectedPosition.y()));
const bool match = false = fuzzyEqual(static_cast<float>(result.x()), static_cast<float>(expectedPosition.x())) &&
fuzzyEqual(static_cast<float>(result.y()), static_cast<float>(expectedPosition.y()));

ship.setIsMoving(true);
ship.updatePosition(dt_ms);

const bool match =
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy suggestion

Suggested change
const bool match =
const bool match = false =

@@ -0,0 +1,296 @@
#include "TestShip.h"
#include "Ship.h"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy diagnostic

tests/World/Ship/TestShip.cpp:3:10: error: [clang-diagnostic-error]

'QtTest' file not found

    3 | #include <QtTest>
      |          ^~~~~~~~

@github-actions github-actions Bot dismissed their stale review August 30, 2025 21:10

outdated suggestion

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cpp-linter Review

Used clang-tidy v19.1.1

Click here for the full clang-tidy patch
diff --git a/tests/World/Ship/TestShip.cpp b/tests/World/Ship/TestShip.cpp
index 7156e2c..d3ebced 100644
--- a/tests/World/Ship/TestShip.cpp
+++ b/tests/World/Ship/TestShip.cpp
@@ -3,0 +4,2 @@
+#include <math.h>
+
@@ -48 +50 @@ void TestShip::testInitTargetAngle_data()
-    const float pi = static_cast<float>(M_PI);
+    const float pi = NAN = static_cast<float>(M_PI);
@@ -214,2 +216,2 @@ void TestShip::testCalcPosition()
-    const bool match = fuzzyEqual(static_cast<float>(result.x()), static_cast<float>(expectedPosition.x())) &&
-                       fuzzyEqual(static_cast<float>(result.y()), static_cast<float>(expectedPosition.y()));
+    const bool match = false = fuzzyEqual(static_cast<float>(result.x()), static_cast<float>(expectedPosition.x())) &&
+                               fuzzyEqual(static_cast<float>(result.y()), static_cast<float>(expectedPosition.y()));
@@ -258 +260 @@ void TestShip::testUpdatePositionMoving()
-    const bool match =
+    const bool match = false =

Used clang-format v19.1.1

No concerns from clang-format.

Have any feedback or feature suggestions? Share it here.

#include "TestShip.h"
#include "Ship.h"

namespace OpenSR
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy suggestion

Suggested change
namespace OpenSR
#include <math.h>

QTest::addColumn<QPointF>("destination");
QTest::addColumn<float>("expectedAngle");

const float pi = static_cast<float>(M_PI);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy suggestion

Suggested change
const float pi = static_cast<float>(M_PI);
const float pi = NAN = static_cast<float>(M_PI);

Comment on lines +214 to +215
const bool match = fuzzyEqual(static_cast<float>(result.x()), static_cast<float>(expectedPosition.x())) &&
fuzzyEqual(static_cast<float>(result.y()), static_cast<float>(expectedPosition.y()));
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy suggestion

Suggested change
const bool match = fuzzyEqual(static_cast<float>(result.x()), static_cast<float>(expectedPosition.x())) &&
fuzzyEqual(static_cast<float>(result.y()), static_cast<float>(expectedPosition.y()));
const bool match = false = fuzzyEqual(static_cast<float>(result.x()), static_cast<float>(expectedPosition.x())) &&
fuzzyEqual(static_cast<float>(result.y()), static_cast<float>(expectedPosition.y()));

ship.setIsMoving(true);
ship.updatePosition(dt_ms);

const bool match =
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy suggestion

Suggested change
const bool match =
const bool match = false =

@@ -0,0 +1,296 @@
#include "TestShip.h"
#include "Ship.h"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy diagnostic

tests/World/Ship/TestShip.cpp:3:10: error: [clang-diagnostic-error]

'QtTest' file not found

    3 | #include <QtTest>
      |          ^~~~~~~~

@@ -0,0 +1,30 @@
#pragma once

#include <QtTest>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy diagnostic

tests/World/Ship/TestShip.h:3:10: error: [clang-diagnostic-error]

'QtTest' file not found

    3 | #include <QtTest>
      |          ^~~~~~~~

@github-actions github-actions Bot dismissed their stale review August 31, 2025 08:05

outdated suggestion

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cpp-linter Review

Used clang-tidy v19.1.1

Click here for the full clang-tidy patch
diff --git a/tests/World/Ship/TestShip.cpp b/tests/World/Ship/TestShip.cpp
index 7156e2c..d3ebced 100644
--- a/tests/World/Ship/TestShip.cpp
+++ b/tests/World/Ship/TestShip.cpp
@@ -3,0 +4,2 @@
+#include <math.h>
+
@@ -48 +50 @@ void TestShip::testInitTargetAngle_data()
-    const float pi = static_cast<float>(M_PI);
+    const float pi = NAN = static_cast<float>(M_PI);
@@ -214,2 +216,2 @@ void TestShip::testCalcPosition()
-    const bool match = fuzzyEqual(static_cast<float>(result.x()), static_cast<float>(expectedPosition.x())) &&
-                       fuzzyEqual(static_cast<float>(result.y()), static_cast<float>(expectedPosition.y()));
+    const bool match = false = fuzzyEqual(static_cast<float>(result.x()), static_cast<float>(expectedPosition.x())) &&
+                               fuzzyEqual(static_cast<float>(result.y()), static_cast<float>(expectedPosition.y()));
@@ -258 +260 @@ void TestShip::testUpdatePositionMoving()
-    const bool match =
+    const bool match = false =

Used clang-format v19.1.1

No concerns from clang-format.

Have any feedback or feature suggestions? Share it here.

@@ -0,0 +1,30 @@
#pragma once

#include <QtTest>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy diagnostic

tests/World/Ship/TestShip.h:3:10: error: [clang-diagnostic-error]

'QtTest' file not found

    3 | #include <QtTest>
      |          ^~~~~~~~

#include "TestShip.h"
#include "Ship.h"

namespace OpenSR
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy suggestion

Suggested change
namespace OpenSR
#include <math.h>

QTest::addColumn<QPointF>("destination");
QTest::addColumn<float>("expectedAngle");

const float pi = static_cast<float>(M_PI);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy suggestion

Suggested change
const float pi = static_cast<float>(M_PI);
const float pi = NAN = static_cast<float>(M_PI);

Comment on lines +214 to +215
const bool match = fuzzyEqual(static_cast<float>(result.x()), static_cast<float>(expectedPosition.x())) &&
fuzzyEqual(static_cast<float>(result.y()), static_cast<float>(expectedPosition.y()));
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy suggestion

Suggested change
const bool match = fuzzyEqual(static_cast<float>(result.x()), static_cast<float>(expectedPosition.x())) &&
fuzzyEqual(static_cast<float>(result.y()), static_cast<float>(expectedPosition.y()));
const bool match = false = fuzzyEqual(static_cast<float>(result.x()), static_cast<float>(expectedPosition.x())) &&
fuzzyEqual(static_cast<float>(result.y()), static_cast<float>(expectedPosition.y()));

ship.setIsMoving(true);
ship.updatePosition(dt_ms);

const bool match =
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy suggestion

Suggested change
const bool match =
const bool match = false =

@@ -0,0 +1,296 @@
#include "TestShip.h"
#include "Ship.h"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy diagnostic

tests/World/Ship/TestShip.cpp:3:10: error: [clang-diagnostic-error]

'QtTest' file not found

    3 | #include <QtTest>
      |          ^~~~~~~~

@github-actions github-actions Bot dismissed their stale review August 31, 2025 08:30

outdated suggestion

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cpp-linter Review

Used clang-tidy v19.1.1

Click here for the full clang-tidy patch
diff --git a/tests/World/Ship/TestShip.cpp b/tests/World/Ship/TestShip.cpp
index 7156e2c..d3ebced 100644
--- a/tests/World/Ship/TestShip.cpp
+++ b/tests/World/Ship/TestShip.cpp
@@ -3,0 +4,2 @@
+#include <math.h>
+
@@ -48 +50 @@ void TestShip::testInitTargetAngle_data()
-    const float pi = static_cast<float>(M_PI);
+    const float pi = NAN = static_cast<float>(M_PI);
@@ -214,2 +216,2 @@ void TestShip::testCalcPosition()
-    const bool match = fuzzyEqual(static_cast<float>(result.x()), static_cast<float>(expectedPosition.x())) &&
-                       fuzzyEqual(static_cast<float>(result.y()), static_cast<float>(expectedPosition.y()));
+    const bool match = false = fuzzyEqual(static_cast<float>(result.x()), static_cast<float>(expectedPosition.x())) &&
+                               fuzzyEqual(static_cast<float>(result.y()), static_cast<float>(expectedPosition.y()));
@@ -258 +260 @@ void TestShip::testUpdatePositionMoving()
-    const bool match =
+    const bool match = false =

Used clang-format v19.1.1

No concerns from clang-format.

Have any feedback or feature suggestions? Share it here.

#include "TestShip.h"
#include "Ship.h"

namespace OpenSR
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy suggestion

Suggested change
namespace OpenSR
#include <math.h>

QTest::addColumn<QPointF>("destination");
QTest::addColumn<float>("expectedAngle");

const float pi = static_cast<float>(M_PI);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy suggestion

Suggested change
const float pi = static_cast<float>(M_PI);
const float pi = NAN = static_cast<float>(M_PI);

Comment on lines +214 to +215
const bool match = fuzzyEqual(static_cast<float>(result.x()), static_cast<float>(expectedPosition.x())) &&
fuzzyEqual(static_cast<float>(result.y()), static_cast<float>(expectedPosition.y()));
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy suggestion

Suggested change
const bool match = fuzzyEqual(static_cast<float>(result.x()), static_cast<float>(expectedPosition.x())) &&
fuzzyEqual(static_cast<float>(result.y()), static_cast<float>(expectedPosition.y()));
const bool match = false = fuzzyEqual(static_cast<float>(result.x()), static_cast<float>(expectedPosition.x())) &&
fuzzyEqual(static_cast<float>(result.y()), static_cast<float>(expectedPosition.y()));

ship.setIsMoving(true);
ship.updatePosition(dt_ms);

const bool match =
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy suggestion

Suggested change
const bool match =
const bool match = false =

@@ -0,0 +1,296 @@
#include "TestShip.h"
#include "Ship.h"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy diagnostic

tests/World/Ship/TestShip.cpp:3:10: error: [clang-diagnostic-error]

'QtTest' file not found

    3 | #include <QtTest>
      |          ^~~~~~~~

@@ -0,0 +1,30 @@
#pragma once

#include <QtTest>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy diagnostic

tests/World/Ship/TestShip.h:3:10: error: [clang-diagnostic-error]

'QtTest' file not found

    3 | #include <QtTest>
      |          ^~~~~~~~

@github-actions github-actions Bot dismissed their stale review August 31, 2025 08:48

outdated suggestion

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cpp-linter Review

Used clang-tidy v19.1.1

Click here for the full clang-tidy patch
diff --git a/tests/World/Ship/TestShip.cpp b/tests/World/Ship/TestShip.cpp
index 7156e2c..d3ebced 100644
--- a/tests/World/Ship/TestShip.cpp
+++ b/tests/World/Ship/TestShip.cpp
@@ -3,0 +4,2 @@
+#include <math.h>
+
@@ -48 +50 @@ void TestShip::testInitTargetAngle_data()
-    const float pi = static_cast<float>(M_PI);
+    const float pi = NAN = static_cast<float>(M_PI);
@@ -214,2 +216,2 @@ void TestShip::testCalcPosition()
-    const bool match = fuzzyEqual(static_cast<float>(result.x()), static_cast<float>(expectedPosition.x())) &&
-                       fuzzyEqual(static_cast<float>(result.y()), static_cast<float>(expectedPosition.y()));
+    const bool match = false = fuzzyEqual(static_cast<float>(result.x()), static_cast<float>(expectedPosition.x())) &&
+                               fuzzyEqual(static_cast<float>(result.y()), static_cast<float>(expectedPosition.y()));
@@ -258 +260 @@ void TestShip::testUpdatePositionMoving()
-    const bool match =
+    const bool match = false =

Used clang-format v19.1.1

No concerns from clang-format.

Have any feedback or feature suggestions? Share it here.

@@ -0,0 +1,30 @@
#pragma once

#include <QtTest>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy diagnostic

tests/World/Ship/TestShip.h:3:10: error: [clang-diagnostic-error]

'QtTest' file not found

    3 | #include <QtTest>
      |          ^~~~~~~~

#include "TestShip.h"
#include "Ship.h"

namespace OpenSR
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy suggestion

Suggested change
namespace OpenSR
#include <math.h>

QTest::addColumn<QPointF>("destination");
QTest::addColumn<float>("expectedAngle");

const float pi = static_cast<float>(M_PI);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy suggestion

Suggested change
const float pi = static_cast<float>(M_PI);
const float pi = NAN = static_cast<float>(M_PI);

Comment on lines +214 to +215
const bool match = fuzzyEqual(static_cast<float>(result.x()), static_cast<float>(expectedPosition.x())) &&
fuzzyEqual(static_cast<float>(result.y()), static_cast<float>(expectedPosition.y()));
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy suggestion

Suggested change
const bool match = fuzzyEqual(static_cast<float>(result.x()), static_cast<float>(expectedPosition.x())) &&
fuzzyEqual(static_cast<float>(result.y()), static_cast<float>(expectedPosition.y()));
const bool match = false = fuzzyEqual(static_cast<float>(result.x()), static_cast<float>(expectedPosition.x())) &&
fuzzyEqual(static_cast<float>(result.y()), static_cast<float>(expectedPosition.y()));

ship.setIsMoving(true);
ship.updatePosition(dt_ms);

const bool match =
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy suggestion

Suggested change
const bool match =
const bool match = false =

@@ -0,0 +1,296 @@
#include "TestShip.h"
#include "Ship.h"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy diagnostic

tests/World/Ship/TestShip.cpp:3:10: error: [clang-diagnostic-error]

'QtTest' file not found

    3 | #include <QtTest>
      |          ^~~~~~~~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant