Skip to content

Commit

Permalink
Add code guidelines
Browse files Browse the repository at this point in the history
  • Loading branch information
vongosling authored and lollipopjin committed Dec 29, 2016
1 parent 2e6e3f6 commit 33d4515
Show file tree
Hide file tree
Showing 21 changed files with 673 additions and 18 deletions.
2 changes: 2 additions & 0 deletions _data/navigation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ docs:
url: /docs/cluster-deployment/
- title: Contributor Guide
children:
- title: "Code Guidelines"
url: /docs/code-guidelines/
- title: "Best Practice in PR"
url: /docs/pull-request/
- title: Developer Guide
Expand Down
29 changes: 29 additions & 0 deletions _docs/07-code-guidelines.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
title: "Coding Guidelines"
permalink: /docs/code-guidelines/
excerpt: "Apache RocketMQ Coding Guidelines"
modified: 2016-12-29T15:01:43-04:00
---

{% include toc %}

# Introduction
This document describes formatting rules and guidelines for software source code. Note that this document does not cover best programming practices or techniques. It is solely concentrating on source code formatting and conventions.

Studies have shown that 80% of development time spent on software maintenance which involves software source code understanding, refactoring and support. Established and enforced code formatting rules and guidelines improve source code readability, promote team code ownership, allow engineers understand new code more quickly and thorough as well as simplify maintenance.

# Code template for idea
## Import code style
![codestyle](/assets/images/code_guidelines/codestyle.png)

## Import copyright
### 1. Import from directory style -> copyright -> Apache.xml
![copyright](/assets/images/code_guidelines/copyright.png)
### 2. Choose Apache copyright
![copyright-choose](/assets/images/code_guidelines/copyright-choose.png)


## Remove author javadoc tag
![author-javadoc-tag](/assets/images/code_guidelines/author-tag.png)


Binary file added assets/images/code_guidelines/author-tag.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/code_guidelines/codestyle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/code_guidelines/copyright.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions content/archive-layout-with-content/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,20 @@ <h2 class="archive__item-title" itemprop="headline">
</article>
</div>

<div class="list__item">
<article class="archive__item" itemscope="" itemtype="http://schema.org/CreativeWork">

<h2 class="archive__item-title" itemprop="headline">

<a href="/docs/code-guidelines/" rel="permalink">Coding Guidelines</a>

</h2>

<p class="archive__item-excerpt" itemprop="description">Apache RocketMQ Coding Guidelines
</p>
</article>
</div>

<div class="list__item">
<article class="archive__item" itemscope="" itemtype="http://schema.org/CreativeWork">

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions content/collection-archive/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,27 @@ <h2 class="archive__item-title" itemprop="headline">
</div>







<div class="list__item">
<article class="archive__item" itemscope itemtype="http://schema.org/CreativeWork">

<h2 class="archive__item-title" itemprop="headline">

<a href="/docs/code-guidelines/" rel="permalink">Coding Guidelines
</a>

</h2>

<p class="archive__item-excerpt" itemprop="description">Apache RocketMQ Coding Guidelines
</p>
</article>
</div>





Expand Down
12 changes: 10 additions & 2 deletions content/docs/cli-admin-tool/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@


<meta property="og:type" content="article">
<meta property="article:published_time" content="2016-12-27T12:03:29+08:00">
<meta property="article:published_time" content="2016-12-29T11:23:18+08:00">



Expand Down Expand Up @@ -227,6 +227,14 @@



<li><a href="/docs/code-guidelines/" class="">Code Guidelines</a></li>







<li><a href="/docs/pull-request/" class="">Best Practice in PR</a></li>

</ul>
Expand Down Expand Up @@ -355,7 +363,7 @@
<article class="page" itemscope itemtype="http://schema.org/CreativeWork">
<meta itemprop="headline" content="CLI Admin Tool">
<meta itemprop="description" content="RocketMQ provides a CLI admin tool belt to query, manage and diagnose various issues.">
<meta itemprop="datePublished" content="December 27, 2016">
<meta itemprop="datePublished" content="December 29, 2016">
<meta itemprop="dateModified" content="December 17, 2016">

<div class="page__inner-wrap">
Expand Down
12 changes: 10 additions & 2 deletions content/docs/cluster-deployment/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@


<meta property="og:type" content="article">
<meta property="article:published_time" content="2016-12-27T12:03:29+08:00">
<meta property="article:published_time" content="2016-12-29T11:23:18+08:00">



Expand Down Expand Up @@ -227,6 +227,14 @@



<li><a href="/docs/code-guidelines/" class="">Code Guidelines</a></li>







<li><a href="/docs/pull-request/" class="">Best Practice in PR</a></li>

</ul>
Expand Down Expand Up @@ -355,7 +363,7 @@
<article class="page" itemscope itemtype="http://schema.org/CreativeWork">
<meta itemprop="headline" content="Cluster Configuration and Deployment">
<meta itemprop="description" content="Prerequisite">
<meta itemprop="datePublished" content="December 27, 2016">
<meta itemprop="datePublished" content="December 29, 2016">
<meta itemprop="dateModified" content="December 17, 2016">

<div class="page__inner-wrap">
Expand Down
Loading

0 comments on commit 33d4515

Please sign in to comment.