Skip to content

Latest commit

 

History

History
36 lines (31 loc) · 1.13 KB

CONTRIBUTING.md

File metadata and controls

36 lines (31 loc) · 1.13 KB

Contributing to CppPrimer

Please ensure your pull request adheres to the following guidelines:

  1. No tabs, Use only spaces, and indent 4 space at a time.
  2. No using namespace std;
  3. Put spaces after each semicolon, around operators.
for(auto i=0;i!=size;++i) 		     // Bad
for (auto i = 0; i != size; ++i) 	  // Good
auto epsilon=2*gamma-delta*pi;	     // Bad
auto epsilon = 2 * gamma - delta * pi; // Good
  1. Put braces to next line in function(such as main()), otherwise, End of line.
int main()
{
    Sales_item total;
    if (std::cin >> total) {
        Sales_item trans;
        while (std::cin >> trans) {
            //...
        }
    }
}

If you intall ClangFormat, You wouldn't care about the format, just run the command:

clang-format -i your-code.cpp

Tips for good commits and issues.

  1. Read up on Github Flavored Markdown
  2. Closing Issues via Commit Messages is encouraged.