Skip to content

Add clang-format checks in Danger - #3

Open
robertodr wants to merge 9 commits into
PCMSolver:masterfrom
robertodr:clang-format
Open

robertodr wants to merge 9 commits into
PCMSolver:masterfrom
robertodr:clang-format

Conversation

@robertodr

Copy link
Copy Markdown
Member

No description provided.

@MinazoBot

MinazoBot commented Aug 9, 2017 •

Copy link
Copy Markdown
1 Error
🚫 Code style violations detected.

Code Style Check


Code style violations detected in the following files:

  • hello_world.cpp

  • vector.cpp

Execute one of the following actions and commit again:

  1. Run clang-format on the offending files
  2. Apply the suggested patches with git apply patch.

hello_world.cpp

--- hello_world.cpp
+++ hello_world.cpp
@@ -4,13 +4,11 @@
 
 std::vector<int> myVector();
 
-std::string message() {
-         return "Hello, Danger world!";
-}
+std::string message() { return "Hello, Danger world!"; }
 
 int main() {
   std::cout << message() << std::endl;
 
-  std::vector< int  > v = myVector();
-        return EXIT_SUCCESS;
+  std::vector<int> v = myVector();
+  return EXIT_SUCCESS;
 }

vector.cpp

--- vector.cpp
+++ vector.cpp
@@ -1,13 +1,13 @@
 #include <vector>
 
 std::vector<int> myVector() {
-int arr[] = {16, 2, 77, 29};
-// Create a vector containing integers
-std::vector<int> v (arr, arr + sizeof(arr) /sizeof(arr[0]) );
+  int arr[] = {16, 2, 77, 29};
+  // Create a vector containing integers
+  std::vector<int> v(arr, arr + sizeof(arr) / sizeof(arr[0]));
 
-// Add two more integers to vector
-v.push_back(25);
-v.push_back(13);
+  // Add two more integers to vector
+  v.push_back(25);
+  v.push_back(13);
 
-return v;
+  return v;
 }

Generated by 🚫 Danger

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

Labels

None yet

2 participants