Skip to content
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

Add clang-format checks in Danger #3

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

robertodr
Copy link
Member

No description provided.

@MinazoBot
Copy link

MinazoBot commented Aug 9, 2017

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants