Skip to content

Test pr review refactor #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed

Test pr review refactor #40

wants to merge 5 commits into from

Conversation

2bndy5
Copy link
Collaborator

@2bndy5 2bndy5 commented Sep 5, 2024

Copy link

github-actions bot commented Sep 5, 2024

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-format reports: 2 file(s) not formatted
  • src/demo.cpp
  • src/demo.hpp
clang-tidy reports: 5 concern(s)

Have any feedback or feature suggestions? Share it here.

github-actions[bot]

This comment was marked as duplicate.

@github-actions github-actions bot dismissed their stale review September 5, 2024 08:10

outdated suggestion

github-actions[bot]

This comment was marked as duplicate.

@github-actions github-actions bot dismissed their stale review September 5, 2024 08:13

outdated suggestion

github-actions[bot]

This comment was marked as duplicate.

github-actions[bot]

This comment was marked as duplicate.

@github-actions github-actions bot dismissed their stale review September 5, 2024 18:59

outdated suggestion

github-actions[bot]

This comment was marked as outdated.

@github-actions github-actions bot dismissed their stale review September 5, 2024 19:02

outdated suggestion

github-actions[bot]

This comment was marked as resolved.

@github-actions github-actions bot dismissed their stale review September 5, 2024 21:30

outdated suggestion

github-actions[bot]

This comment was marked as outdated.

@github-actions github-actions bot dismissed their stale review September 5, 2024 22:45

outdated suggestion

Copy link

@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

Click here for the full clang-tidy patch
diff --git a/src/demo.cpp b/src/demo.cpp
index 18d07bf..9e30a45 100644
--- a/src/demo.cpp
+++ b/src/demo.cpp
@@ -9 +9 @@ size_t dummyFunc(size_t i) { return i; }
-int main()
+auto main() -> int
@@ -11 +11,3 @@ int main()
-    for (;;) break;
+    for (;;) {
+        break;
+    }
diff --git a/src/demo.hpp b/src/demo.hpp
index 2972211..4a96fbd 100644
--- a/src/demo.hpp
+++ b/src/demo.hpp
@@ -10,4 +10,5 @@ class Dummy {
-    void *not_useful(char *str){
-        useless = str;
-        return 0;
-    }
+        auto not_useful(char* str) -> void*
+        {
+            useless = str;
+            return nullptr;
+        }

Only 4 out of 5 clang-format concerns fit within this pull request's diff.

Click here for the full clang-format patch
diff --git a/src/demo.cpp b/src/demo.cpp
index 18d07bf..0c1db60 100644
--- a/src/demo.cpp
+++ b/src/demo.cpp
@@ -11 +11,2 @@ int main()
-    for (;;) break;
+    for (;;)
+        break;
@@ -13 +14 @@ int main()
-    printf( "Hello world!\n");
+    printf("Hello world!\n");
@@ -15 +16,2 @@ int main()
-    return 0;}
+    return 0;
+}
diff --git a/src/demo.hpp b/src/demo.hpp
index 2972211..645a50f 100644
--- a/src/demo.hpp
+++ b/src/demo.hpp
@@ -9,2 +9,3 @@ class Dummy {
-    public:
-    void *not_useful(char *str){
+public:
+    void* not_useful(char* str)
+    {
@@ -16,23 +17 @@ class Dummy {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-struct LongDiff
-{
+struct LongDiff {

Have any feedback or feature suggestions? Share it here.


int main()
{
for (;;)
break;
for (;;) break;
Copy link

Choose a reason for hiding this comment

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

clang-format suggestion

Suggested change
for (;;) break;
for (;;)
break;

clang-tidy diagnostics

Suggested change
for (;;) break;
for (;;) {
break;
}


printf("Hello world!\n");
printf( "Hello world!\n");
Copy link

Choose a reason for hiding this comment

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

clang-format suggestion

Suggested change
printf( "Hello world!\n");
printf("Hello world!\n");

clang-tidy diagnostic

src/demo.cpp:13:5: warning: [cppcoreguidelines-pro-type-vararg]

do not call c-style vararg functions

   13 |     printf( "Hello world!\n");
      |     ^


return 0;
}
return 0;}
Copy link

Choose a reason for hiding this comment

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

clang-format suggestion

Suggested change
return 0;}
return 0;
}

Comment on lines 9 to +10
public:
void *not_usefull(char *str){
void *not_useful(char *str){
Copy link

Choose a reason for hiding this comment

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

clang-format suggestion

Suggested change
public:
void *not_usefull(char *str){
void *not_useful(char *str){
public:
void* not_useful(char* str)
{

@@ -6,12 +6,10 @@
// using size_t from cstddef
size_t dummyFunc(size_t i) { return i; }

int main()
Copy link

Choose a reason for hiding this comment

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

clang-tidy diagnostics

Suggested change
int main()
auto main() -> int

Comment on lines +10 to 13
void *not_useful(char *str){
useless = str;
return 0;
}
Copy link

Choose a reason for hiding this comment

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

clang-tidy diagnostics

Suggested change
void *not_useful(char *str){
useless = str;
return 0;
}
auto not_useful(char* str) -> void*
{
useless = str;
return nullptr;
}

@2bndy5 2bndy5 force-pushed the test-pr-review-refactor branch from 4a861e3 to 4065be2 Compare September 6, 2024 20:58
@github-actions github-actions bot dismissed their stale review September 6, 2024 21:04

outdated suggestion

github-actions[bot]

This comment was marked as duplicate.

@2bndy5 2bndy5 force-pushed the test-pr-review-refactor branch from 455910a to 19c9a13 Compare September 6, 2024 21:07
@github-actions github-actions bot dismissed their stale review September 6, 2024 21:09

outdated suggestion

Copy link

@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

Click here for the full clang-tidy patch
diff --git a/src/demo.cpp b/src/demo.cpp
index 18d07bf..9e30a45 100644
--- a/src/demo.cpp
+++ b/src/demo.cpp
@@ -9 +9 @@ size_t dummyFunc(size_t i) { return i; }
-int main()
+auto main() -> int
@@ -11 +11,3 @@ int main()
-    for (;;) break;
+    for (;;) {
+        break;
+    }
diff --git a/src/demo.hpp b/src/demo.hpp
index 2972211..4a96fbd 100644
--- a/src/demo.hpp
+++ b/src/demo.hpp
@@ -10,4 +10,5 @@ class Dummy {
-    void *not_useful(char *str){
-        useless = str;
-        return 0;
-    }
+        auto not_useful(char* str) -> void*
+        {
+            useless = str;
+            return nullptr;
+        }
Click here for the full clang-format patch
diff --git a/src/demo.cpp b/src/demo.cpp
index 18d07bf..0c1db60 100644
--- a/src/demo.cpp
+++ b/src/demo.cpp
@@ -11 +11,2 @@ int main()
-    for (;;) break;
+    for (;;)
+        break;
@@ -13 +14 @@ int main()
-    printf( "Hello world!\n");
+    printf("Hello world!\n");
@@ -15 +16,2 @@ int main()
-    return 0;}
+    return 0;
+}
diff --git a/src/demo.hpp b/src/demo.hpp
index 2972211..645a50f 100644
--- a/src/demo.hpp
+++ b/src/demo.hpp
@@ -9,2 +9,3 @@ class Dummy {
-    public:
-    void *not_useful(char *str){
+public:
+    void* not_useful(char* str)
+    {
@@ -16,23 +17 @@ class Dummy {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-struct LongDiff
-{
+struct LongDiff {

Have any feedback or feature suggestions? Share it here.

@2bndy5 2bndy5 closed this Sep 12, 2024
@2bndy5 2bndy5 deleted the test-pr-review-refactor branch September 12, 2024 20:31
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