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

docs: polish code style document for pouch #1283

Merged

Conversation

allencloud
Copy link
Collaborator

@allencloud allencloud commented May 8, 2018

Signed-off-by: Allen Sun allensun.shl@alibaba-inc.com

Ⅰ. Describe what this PR did

This pull request tries to polish the code style document of project Pouch. These code styles should be followed when contributors are collaborating in this open source project. We will encourage every contributor to read this code style document first, and then do the code change.

In this pull request, I put forward the following 10 code style rules which are additional:

  • RULE001 - Add blank line between field's comments
  • RULE002 - Add parameter name in interface definition
  • RULE003 - Import Packages
  • RULE004 - Variable declaration position
  • RULE005 - Generation of action failure
  • RULE006 - Return fast to ident less
  • RULE007 - Lowercase log and error
  • RULE008 - Nested errors
  • RULE009 - Comment correctly
  • RULE010 - Always remember DRY

In addition, I do not think we should include markdown lint rule in https://github.com/markdownlint/markdownlint/blob/master/docs/RULES.md#md010---hard-tabs .

I think both tabs and whitespaces are valid here. cc @HusterWan

Ⅱ. Does this pull request fix one issue?

none

Ⅲ. Describe how you did it

make code style document more readable and more specific.

Ⅳ. Describe how to verify it

none

Ⅴ. Special notes for reviews

none

Signed-off-by: Allen Sun <allensun.shl@alibaba-inc.com>
@codecov-io
Copy link

codecov-io commented May 8, 2018

Codecov Report

Merging #1283 into master will decrease coverage by 0.27%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1283      +/-   ##
==========================================
- Coverage   15.53%   15.26%   -0.28%     
==========================================
  Files         173      172       -1     
  Lines       10858    10698     -160     
==========================================
- Hits         1687     1633      -54     
+ Misses       9052     8945     -107     
- Partials      119      120       +1
Impacted Files Coverage Δ
daemon/mgr/image_utils.go 0% <0%> (-40%) ⬇️
pkg/reference/def.go 33.33% <0%> (-11.12%) ⬇️
daemon/mgr/cri_utils.go 28.85% <0%> (-0.46%) ⬇️
cli/rm.go 0% <0%> (ø) ⬆️
apis/server/container_bridge.go 0% <0%> (ø) ⬆️
cli/image_list.go 0% <0%> (ø) ⬆️
cli/run.go 0% <0%> (ø) ⬆️
ctrd/container.go 0% <0%> (ø) ⬆️
daemon/mgr/volume.go 0% <0%> (ø) ⬆️
apis/server/volume_bridge.go 0% <0%> (ø) ⬆️
... and 14 more

@Letty5411
Copy link
Contributor

LGTM

@pouchrobot pouchrobot added the LGTM one maintainer or community participant agrees to merge the pull reuqest. label May 9, 2018
@allencloud allencloud merged commit 1313931 into AliyunContainerService:master May 9, 2018
@allencloud allencloud deleted the polich-codestyle branch May 9, 2018 06:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
areas/docs LGTM one maintainer or community participant agrees to merge the pull reuqest. size/XL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants