Conversation
Cpp-Linter Report
|
There was a problem hiding this comment.
Cpp-linter Review
Used clang-format v17.0.4
Only 5 out of 7 new 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 1bf553e..86d9f03 100644
--- a/src/demo.cpp
+++ b/src/demo.cpp
@@ -4,0 +5,2 @@
+int main()
+{
@@ -6,6 +8,2 @@
-
-
-int main(){
-
- for (;;) break;
-
+ for (;;)
+ break;
@@ -15,4 +13,2 @@ int main(){
-
-
-
- return 0;}
+ return 0;
+}
diff --git a/src/demo.hpp b/src/demo.hpp
index f93d012..dad4fd6 100644
--- a/src/demo.hpp
+++ b/src/demo.hpp
@@ -3,2 +2,0 @@
-
-
@@ -8,4 +6,8 @@ class Dummy {
- Dummy() :numb(0), useless("\0"){}
-
- public:
- void *not_useful(char *str){useless = str;}
+ Dummy()
+ : numb(0)
+ , useless("\0")
+ {
+ }
+
+public:
+ void* not_useful(char* str) { useless = str; }
@@ -14,19 +16 @@ class Dummy {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-struct LongDiff
-{
+struct LongDiff {
@@ -35 +18,0 @@ struct LongDiff
-Used clang-tidy v17.0.4
Click here for the full clang-tidy patch
diff --git a/src/demo.cpp b/src/demo.cpp
index 1bf553e..8caf462 100644
--- a/src/demo.cpp
+++ b/src/demo.cpp
@@ -2,2 +2 @@
-#include "demo.hpp"
-#include <stdio.h>
+#include <cstdio>
@@ -4,0 +4,2 @@
+auto main() -> int
+{
@@ -6,6 +7,3 @@
-
-
-int main(){
-
- for (;;) break;
-
+ for (;;) {
+ break;
+ }
@@ -18 +16,2 @@ int main(){
- return 0;}
+ return 0;
+}
diff --git a/src/demo.hpp b/src/demo.hpp
index f93d012..1cf7f24 100644
--- a/src/demo.hpp
+++ b/src/demo.hpp
@@ -6,3 +6,3 @@ class Dummy {
- char* useless;
- int numb;
- Dummy() :numb(0), useless("\0"){}
+ char* useless { "\0" };
+ int numb { 0 };
+ Dummy() { }
@@ -10,2 +10,2 @@ class Dummy {
- public:
- void *not_useful(char *str){useless = str;}
+public:
+ auto not_useful(char* str) -> void* { useless = str; }Have any feedback or feature suggestions? Share it here.
|
|
||
|
|
||
| int main(){ | ||
|
|
||
| for (;;) break; | ||
|
|
There was a problem hiding this comment.
clang-format suggestions
| int main(){ | |
| for (;;) break; | |
| for (;;) | |
| break; |
clang-tidy diagnostic(s)
- use a trailing return type for this function [modernize-use-trailing-return-type]
- statement should be inside braces [readability-braces-around-statements]
| int main(){ | |
| for (;;) break; | |
| for (;;) { | |
| break; | |
| } |
| Dummy() :numb(0), useless("\0"){} | ||
|
|
||
| public: | ||
| void *not_usefull(char *str){ | ||
| useless = str; | ||
| return 0; | ||
| } | ||
| void *not_useful(char *str){useless = str;} |
There was a problem hiding this comment.
clang-format suggestions
| Dummy() :numb(0), useless("\0"){} | |
| public: | |
| void *not_usefull(char *str){ | |
| useless = str; | |
| return 0; | |
| } | |
| void *not_useful(char *str){useless = str;} | |
| Dummy() | |
| : numb(0) | |
| , useless("\0") | |
| { | |
| } | |
| public: | |
| void* not_useful(char* str) { useless = str; } |
| public: | ||
| void *not_usefull(char *str){ | ||
| useless = str; | ||
| return 0; | ||
| } | ||
| void *not_useful(char *str){useless = str;} |
There was a problem hiding this comment.
clang-tidy diagnostic(s)
- use a trailing return type for this function [modernize-use-trailing-return-type]
| public: | |
| void *not_usefull(char *str){ | |
| useless = str; | |
| return 0; | |
| } | |
| void *not_useful(char *str){useless = str;} | |
| public: | |
| auto not_useful(char* str) -> void* { useless = str; } |
There was a problem hiding this comment.
Cpp-linter Review
Used clang-format v17.0.4
Only 5 out of 7 new 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 1bf553e..86d9f03 100644
--- a/src/demo.cpp
+++ b/src/demo.cpp
@@ -4,0 +5,2 @@
+int main()
+{
@@ -6,6 +8,2 @@
-
-
-int main(){
-
- for (;;) break;
-
+ for (;;)
+ break;
@@ -15,4 +13,2 @@ int main(){
-
-
-
- return 0;}
+ return 0;
+}
diff --git a/src/demo.hpp b/src/demo.hpp
index f93d012..dad4fd6 100644
--- a/src/demo.hpp
+++ b/src/demo.hpp
@@ -3,2 +2,0 @@
-
-
@@ -8,4 +6,8 @@ class Dummy {
- Dummy() :numb(0), useless("\0"){}
-
- public:
- void *not_useful(char *str){useless = str;}
+ Dummy()
+ : numb(0)
+ , useless("\0")
+ {
+ }
+
+public:
+ void* not_useful(char* str) { useless = str; }
@@ -14,19 +16 @@ class Dummy {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-struct LongDiff
-{
+struct LongDiff {
@@ -35 +18,0 @@ struct LongDiff
-Used clang-tidy v17.0.4
Click here for the full clang-tidy patch
diff --git a/src/demo.cpp b/src/demo.cpp
index 1bf553e..8caf462 100644
--- a/src/demo.cpp
+++ b/src/demo.cpp
@@ -2,2 +2 @@
-#include "demo.hpp"
-#include <stdio.h>
+#include <cstdio>
@@ -4,0 +4,2 @@
+auto main() -> int
+{
@@ -6,6 +7,3 @@
-
-
-int main(){
-
- for (;;) break;
-
+ for (;;) {
+ break;
+ }
@@ -18 +16,2 @@ int main(){
- return 0;}
+ return 0;
+}
diff --git a/src/demo.hpp b/src/demo.hpp
index f93d012..1cf7f24 100644
--- a/src/demo.hpp
+++ b/src/demo.hpp
@@ -6,3 +6,3 @@ class Dummy {
- char* useless;
- int numb;
- Dummy() :numb(0), useless("\0"){}
+ char* useless { "\0" };
+ int numb { 0 };
+ Dummy() { }
@@ -10,2 +10,2 @@ class Dummy {
- public:
- void *not_useful(char *str){useless = str;}
+public:
+ auto not_useful(char* str) -> void* { useless = str; }Have any feedback or feature suggestions? Share it here.
| char* useless; | ||
| int numb; | ||
| Dummy() :numb(0), useless("\0"){} |
There was a problem hiding this comment.
clang-tidy suggestion
| char* useless; | |
| int numb; | |
| Dummy() :numb(0), useless("\0"){} | |
| char* useless { "\0" }; | |
| int numb { 0 }; | |
| Dummy() { } |
There was a problem hiding this comment.
Cpp-linter Review
Used clang-format v17.0.4
Only 5 out of 7 new 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 1bf553e..86d9f03 100644
--- a/src/demo.cpp
+++ b/src/demo.cpp
@@ -4,0 +5,2 @@
+int main()
+{
@@ -6,6 +8,2 @@
-
-
-int main(){
-
- for (;;) break;
-
+ for (;;)
+ break;
@@ -15,4 +13,2 @@ int main(){
-
-
-
- return 0;}
+ return 0;
+}
diff --git a/src/demo.hpp b/src/demo.hpp
index f93d012..dad4fd6 100644
--- a/src/demo.hpp
+++ b/src/demo.hpp
@@ -3,2 +2,0 @@
-
-
@@ -8,4 +6,8 @@ class Dummy {
- Dummy() :numb(0), useless("\0"){}
-
- public:
- void *not_useful(char *str){useless = str;}
+ Dummy()
+ : numb(0)
+ , useless("\0")
+ {
+ }
+
+public:
+ void* not_useful(char* str) { useless = str; }
@@ -14,19 +16 @@ class Dummy {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-struct LongDiff
-{
+struct LongDiff {
@@ -35 +18,0 @@ struct LongDiff
-Used clang-tidy v17.0.4
Click here for the full clang-tidy patch
diff --git a/src/demo.cpp b/src/demo.cpp
index 1bf553e..8caf462 100644
--- a/src/demo.cpp
+++ b/src/demo.cpp
@@ -2,2 +2 @@
-#include "demo.hpp"
-#include <stdio.h>
+#include <cstdio>
@@ -4,0 +4,2 @@
+auto main() -> int
+{
@@ -6,6 +7,3 @@
-
-
-int main(){
-
- for (;;) break;
-
+ for (;;) {
+ break;
+ }
@@ -18 +16,2 @@ int main(){
- return 0;}
+ return 0;
+}
diff --git a/src/demo.hpp b/src/demo.hpp
index f93d012..1cf7f24 100644
--- a/src/demo.hpp
+++ b/src/demo.hpp
@@ -6,3 +6,3 @@ class Dummy {
- char* useless;
- int numb;
- Dummy() :numb(0), useless("\0"){}
+ char* useless { "\0" };
+ int numb { 0 };
+ Dummy() { }
@@ -10,2 +10,2 @@ class Dummy {
- public:
- void *not_useful(char *str){useless = str;}
+public:
+ auto not_useful(char* str) -> void* { useless = str; }Have any feedback or feature suggestions? Share it here.
|
|
||
|
|
||
|
|
||
| return 0;} |
There was a problem hiding this comment.
clang-format suggestions
| return 0;} | |
| return 0; | |
| } |
| #include "demo.hpp" | ||
| #include <cstdio> | ||
| #include <cstddef> | ||
| #include <stdio.h> |
There was a problem hiding this comment.
clang-tidy diagnostic(s)
- included header demo.hpp is not used directly [misc-include-cleaner]
- inclusion of deprecated C++ header 'stdio.h'; consider using 'cstdio' instead [modernize-deprecated-headers]
| #include "demo.hpp" | |
| #include <cstdio> | |
| #include <cstddef> | |
| #include <stdio.h> | |
| #include <cstdio> |
update CI rm subdir param to pip install
There was a problem hiding this comment.
Cpp-linter Review
Used clang-format v17.0.4
Click here for the full clang-format patch
diff --git a/src/demo.cpp b/src/demo.cpp
index 1bf553e..86d9f03 100644
--- a/src/demo.cpp
+++ b/src/demo.cpp
@@ -4,0 +5,2 @@
+int main()
+{
@@ -6,6 +8,2 @@
-
-
-int main(){
-
- for (;;) break;
-
+ for (;;)
+ break;
@@ -15,4 +13,2 @@ int main(){
-
-
-
- return 0;}
+ return 0;
+}
diff --git a/src/demo.hpp b/src/demo.hpp
index f93d012..dad4fd6 100644
--- a/src/demo.hpp
+++ b/src/demo.hpp
@@ -3,2 +2,0 @@
-
-
@@ -8,4 +6,8 @@ class Dummy {
- Dummy() :numb(0), useless("\0"){}
-
- public:
- void *not_useful(char *str){useless = str;}
+ Dummy()
+ : numb(0)
+ , useless("\0")
+ {
+ }
+
+public:
+ void* not_useful(char* str) { useless = str; }
@@ -14,19 +16 @@ class Dummy {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-struct LongDiff
-{
+struct LongDiff {
@@ -35 +18,0 @@ struct LongDiff
-Used clang-tidy v17.0.4
Click here for the full clang-tidy patch
diff --git a/src/demo.cpp b/src/demo.cpp
index 1bf553e..8caf462 100644
--- a/src/demo.cpp
+++ b/src/demo.cpp
@@ -2,2 +2 @@
-#include "demo.hpp"
-#include <stdio.h>
+#include <cstdio>
@@ -4,0 +4,2 @@
+auto main() -> int
+{
@@ -6,6 +7,3 @@
-
-
-int main(){
-
- for (;;) break;
-
+ for (;;) {
+ break;
+ }
@@ -18 +16,2 @@ int main(){
- return 0;}
+ return 0;
+}
diff --git a/src/demo.hpp b/src/demo.hpp
index f93d012..1cf7f24 100644
--- a/src/demo.hpp
+++ b/src/demo.hpp
@@ -6,3 +6,3 @@ class Dummy {
- char* useless;
- int numb;
- Dummy() :numb(0), useless("\0"){}
+ char* useless { "\0" };
+ int numb { 0 };
+ Dummy() { }
@@ -10,2 +10,2 @@ class Dummy {
- public:
- void *not_useful(char *str){useless = str;}
+public:
+ auto not_useful(char* str) -> void* { useless = str; }Have any feedback or feature suggestions? Share it here.
|
|
||
| // using size_t from cstddef | ||
| size_t dummyFunc(size_t i) { return i; } | ||
|
|
There was a problem hiding this comment.
clang-format suggestions
| int main() | |
| { |
| #include <cstdio> | ||
| #include <cstddef> | ||
| #include <stdio.h> | ||
|
|
There was a problem hiding this comment.
clang-tidy suggestion
| auto main() -> int | |
| { |
|
|
||
|
|
||
|
|
||
| return 0;} |
There was a problem hiding this comment.
clang-tidy suggestion
| return 0;} | |
| return 0; | |
| } |
| for (;;) break; | ||
|
|
||
|
|
||
| printf("Hello world!\n"); |
There was a problem hiding this comment.
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");
| ^| { | ||
|
|
||
| long diff; | ||
|
|
There was a problem hiding this comment.
clang-format suggestions
Please remove the line(s)
- 35
dismissing outdated reviews while keeping reused suggestions