FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add clang-format checks in Danger by robertodr · Pull Request #3 · PCMSolver/danger-cpp-example · GitHub

Repository navigation

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

Copy link
Copy Markdown
Member

No description provided.

MinazoBot commented Aug 9, 2017 •
edited
Loading

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

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL