packsaddle / ruby-saddler Goto Github PK
View Code? Open in Web Editor NEWHome Page: http://packsaddle.org
License: MIT License
Home Page: http://packsaddle.org
License: MIT License
Migrate to circleci
Split from #31
I don't find a checkstyle formatter for brakeman,
https://github.com/presidentbeef/brakeman/blob/master/OPTIONS.md#output-options
So we can use Saddler::Reporter::Github's PullRequestComment.
brakeman -f text \
| saddler report \
--reporter Saddler::Reporter::Github::PullRequestComment
We want the converter from brakeman output to checkstyle.
e.g. tachikoma and tachikoma.io
guest
I'm using Rubocop with Saddler like this in Rails project on CircleCI hooked by Github push.
When there are Rubocop error with my code, CircleCI build ends with no errors (while warning comments are posted on PR).
I think Saddler Reporter should exit 1 if there are something to post.
thoughts?
sorry to be late
after #44 , I got error below.
E, [2016-05-15T11:26:17.345644 #12599] ERROR -- Saddler: reporter
E, [2016-05-15T11:26:17.345693 #12599] ERROR -- Saddler: #<Saddler::Reporter::Github::PullRequestReviewComment:0x007ffc73b3ab88 @output=#<IO:<STDOUT>>>
/Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/octokit-4.3.0/lib/octokit/response/raise_error.rb:16:in `on_complete': POST https://api.github.com/repos/myuser/sampleapp/pulls/3537/comments: 422 - Validation Failed (Octokit::UnprocessableEntity)
Error summary:
resource: PullRequestReviewComment
code: custom
field: commit_id
message: commit_id is not part of the pull request // See: https://developer.github.com/v3/pulls/comments/#create-a-comment
from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/faraday-0.9.2/lib/faraday/response.rb:9:in `block in call'
from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/faraday-0.9.2/lib/faraday/response.rb:57:in `on_complete'
from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/faraday-0.9.2/lib/faraday/response.rb:8:in `call'
from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/octokit-4.3.0/lib/octokit/middleware/follow_redirects.rb:73:in `perform_with_redirection'
from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/octokit-4.3.0/lib/octokit/middleware/follow_redirects.rb:61:in `call'
from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/faraday-0.9.2/lib/faraday/rack_builder.rb:139:in `build_response'
from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/faraday-0.9.2/lib/faraday/connection.rb:377:in `run_request'
from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/faraday-0.9.2/lib/faraday/connection.rb:177:in `post'
from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/sawyer-0.7.0/lib/sawyer/agent.rb:94:in `call'
from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/octokit-4.3.0/lib/octokit/connection.rb:154:in `request'
from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/octokit-4.3.0/lib/octokit/connection.rb:28:in `post'
from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/octokit-4.3.0/lib/octokit/client/pull_requests.rb:211:in `create_pull_request_comment'
from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/saddler-reporter-github-1.0.0/lib/saddler/reporter/github/client.rb:80:in `create_pull_request_review_comment'
from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/saddler-reporter-github-1.0.0/lib/saddler/reporter/github/pull_request_review_comment.rb:34:in `block in report'
from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/saddler-reporter-github-1.0.0/lib/saddler/reporter/github/pull_request_review_comment.rb:33:in `each'
from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/saddler-reporter-github-1.0.0/lib/saddler/reporter/github/pull_request_review_comment.rb:33:in `report'
from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/saddler-1.0.0/lib/saddler/cli.rb:37:in `report'
from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/saddler-1.0.0/exe/saddler:5:in `<top (required)>'
from /Users/myuser/.rbenv/versions/2.0.0-p247/bin/saddler:23:in `load'
from /Users/myuser/.rbenv/versions/2.0.0-p247/bin/saddler:23:in `<main>'
and environmental variables of Git Pull Request Builder plugin are below
$ghprbActualCommit: b237f0688c1bfa04555a76e61d693af5e072f40f
$ghprbActualCommitAuthor: Yasuhiro Shimizu
$ghprbActualCommitAuthorEmail: [email protected]
$ghprbPullDescription: GitHub pull request '#3572' of commit b237f0688c1bfa04555a76e61d693af5e072f40f, no merge conflicts.
$ghprbPullId: 3572
$ghprbPullLink: https://github.com/myuser/sampleapp/pull/3572
$ghprbPullTitle: Issue/3419 check wip
$ghprbSourceBranch: issue/3419-check-wip
$ghprbTargetBranch: master
$sha1: origin/pr/3572/merge
result is the same if I send pr from forked repo, or original repo
https://github.com/haya14busa/reviewdog
I think reviewdog is awesome. They has single binary, no more dependency hell and simple usage. Wow!
They uses original format and checkstyle! So, we can migrate to reviewdog very easily, I think. I don't migrate yet.
jser/jser.github.io#158
https://travis-ci.org/jser/jser.github.io/builds/80978812
E, [2015-09-18T08:56:46.240274 #2389] ERROR -- Saddler: options
E, [2015-09-18T08:56:46.240480 #2389] ERROR -- Saddler: {"options"=>{}, "debug"=>false, "verbose"=>false, "require"=>"saddler/reporter/github", "reporter"=>"Saddler::Reporter::Github::PullRequestReviewComment"}
E, [2015-09-18T08:56:46.240613 #2389] ERROR -- Saddler: input data
E, [2015-09-18T08:56:46.240710 #2389] ERROR -- Saddler: <?xml version='1.0' encoding='UTF-8'?><checkstyle version='4.3'><file name='/home/travis/build/jser/jser.github.io/_i18n/ja/_posts/2015/2015-09-16-react-0.14-eslint-1.4-es5.md'/></checkstyle>
E, [2015-09-18T08:56:46.240834 #2389] ERROR -- Saddler: reporter
E, [2015-09-18T08:56:46.240927 #2389] ERROR -- Saddler: #<Saddler::Reporter::Github::PullRequestReviewComment:0x000000014395d0 @output=#<IO:<STDOUT>>>
/home/travis/.rvm/gems/ruby-2.2.0/gems/octokit-4.1.0/lib/octokit/response/raise_error.rb:16:in `on_complete': GET https://api.github.com/repos/jser/jser.github.io/pulls/158/comments: 403 - API rate limit exceeded for 52.0.240.122. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.) // See: https://developer.github.com/v3/#rate-limiting (Octokit::TooManyRequests)
from /home/travis/.rvm/gems/ruby-2.2.0/gems/faraday-0.9.1/lib/faraday/response.rb:9:in `block in call'
from /home/travis/.rvm/gems/ruby-2.2.0/gems/faraday-0.9.1/lib/faraday/response.rb:57:in `on_complete'
from /home/travis/.rvm/gems/ruby-2.2.0/gems/faraday-0.9.1/lib/faraday/response.rb:8:in `call'
from /home/travis/.rvm/gems/ruby-2.2.0/gems/octokit-4.1.0/lib/octokit/middleware/follow_redirects.rb:73:in `perform_with_redirection'
from /home/travis/.rvm/gems/ruby-2.2.0/gems/octokit-4.1.0/lib/octokit/middleware/follow_redirects.rb:61:in `call'
from /home/travis/.rvm/gems/ruby-2.2.0/gems/faraday-0.9.1/lib/faraday/rack_builder.rb:139:in `build_response'
from /home/travis/.rvm/gems/ruby-2.2.0/gems/faraday-0.9.1/lib/faraday/connection.rb:377:in `run_request'
from /home/travis/.rvm/gems/ruby-2.2.0/gems/faraday-0.9.1/lib/faraday/connection.rb:140:in `get'
from /home/travis/.rvm/gems/ruby-2.2.0/gems/sawyer-0.6.0/lib/sawyer/agent.rb:94:in `call'
from /home/travis/.rvm/gems/ruby-2.2.0/gems/octokit-4.1.0/lib/octokit/connection.rb:154:in `request'
from /home/travis/.rvm/gems/ruby-2.2.0/gems/octokit-4.1.0/lib/octokit/connection.rb:84:in `paginate'
from /home/travis/.rvm/gems/ruby-2.2.0/gems/octokit-4.1.0/lib/octokit/client/pull_requests.rb:172:in `pull_request_comments'
from /home/travis/.rvm/gems/ruby-2.2.0/gems/saddler-reporter-github-0.1.4/lib/saddler/reporter/github/client.rb:39:in `pull_request_review_comments'
from /home/travis/.rvm/gems/ruby-2.2.0/gems/saddler-reporter-github-0.1.4/lib/saddler/reporter/github/pull_request_review_comment.rb:16:in `report'
from /home/travis/.rvm/gems/ruby-2.2.0/gems/saddler-0.1.1/lib/saddler/cli.rb:37:in `report'
from /home/travis/.rvm/gems/ruby-2.2.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /home/travis/.rvm/gems/ruby-2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /home/travis/.rvm/gems/ruby-2.2.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
from /home/travis/.rvm/gems/ruby-2.2.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
from /home/travis/.rvm/gems/ruby-2.2.0/gems/saddler-0.1.1/exe/saddler:5:in `<top (required)>'
from /home/travis/.rvm/gems/ruby-2.2.0/bin/saddler:23:in `load'
from /home/travis/.rvm/gems/ruby-2.2.0/bin/saddler:23:in `<main>'
from /home/travis/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `eval'
from /home/travis/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `<main>'
The command "sh test/travis-spellcheck.sh" exited with 1.
I very much like your approach of decoupling the report runner from the underlying linters.
Would it be possible for you to share the command line to enable running Saddler on Rails Best Practices and Brakeman as well?
Also, does Saddler support using both the text and Github reporters simultaneously?
I think this is https://github.com/packsaddle/ruby-saddler-reporter-support-git 's bug on v2.0.1 with Jenkins Pull Request Builder Plugin.
If set multiple envs, e.g.
rvm:
- 1.9.3
- 2.0.0
- 2.1
This run saddler 3times ๐ข
Split from #31
rails_best_practices
has format option, so we can set a checkstyle formatter.
I find a checkstyle formatter for rails_best_practices.
https://github.com/maroekun/rails_best_practices-formatter
I'm not sure this works fine with saddler. ๐
https://travis-ci.org/packsaddle/example-travis_ci-commit/jobs/81002675
packsaddle/example-travis_ci-commit#1
E, [2015-09-18T12:04:23.079527 #2026] ERROR -- Saddler: options
E, [2015-09-18T12:04:23.079644 #2026] ERROR -- Saddler: {"options"=>{}, "debug"=>false, "verbose"=>false, "require"=>"saddler/reporter/github", "reporter"=>"Saddler::Reporter::Github::PullRequestReviewComment"}
E, [2015-09-18T12:04:23.079717 #2026] ERROR -- Saddler: input data
E, [2015-09-18T12:04:23.079774 #2026] ERROR -- Saddler: <?xml version='1.0'?>
<checkstyle>
<file name='lib/example/travis_ci.rb'>
<error column='120' line='7' message='Line is too long. [164/120]' severity='info' source='com.puppycrawl.tools.checkstyle.Metrics/LineLength'/>
</file>
</checkstyle>
E, [2015-09-18T12:04:23.079857 #2026] ERROR -- Saddler: reporter
E, [2015-09-18T12:04:23.079913 #2026] ERROR -- Saddler: #<Saddler::Reporter::Github::PullRequestReviewComment:0x00000001c78ed0 @output=#<IO:<STDOUT>>>
/home/travis/.rvm/gems/ruby-1.9.3-p551/gems/octokit-4.1.0/lib/octokit/response/raise_error.rb:16:in `on_complete': POST https://api.github.com/repos/packsaddle/example-travis_ci-commit/pulls/1/comments: 404 - Not Found // See: https://developer.github.com/v3/pulls/comments/#create-a-comment (Octokit::NotFound)
from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/faraday-0.9.1/lib/faraday/response.rb:9:in `block in call'
from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/faraday-0.9.1/lib/faraday/response.rb:57:in `on_complete'
from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/faraday-0.9.1/lib/faraday/response.rb:8:in `call'
from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/octokit-4.1.0/lib/octokit/middleware/follow_redirects.rb:73:in `perform_with_redirection'
from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/octokit-4.1.0/lib/octokit/middleware/follow_redirects.rb:61:in `call'
from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/faraday-0.9.1/lib/faraday/rack_builder.rb:139:in `build_response'
from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/faraday-0.9.1/lib/faraday/connection.rb:377:in `run_request'
from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/faraday-0.9.1/lib/faraday/connection.rb:177:in `post'
from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/sawyer-0.6.0/lib/sawyer/agent.rb:94:in `call'
from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/octokit-4.1.0/lib/octokit/connection.rb:154:in `request'
from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/octokit-4.1.0/lib/octokit/connection.rb:28:in `post'
from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/octokit-4.1.0/lib/octokit/client/pull_requests.rb:211:in `create_pull_request_comment'
from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/saddler-reporter-github-0.1.4/lib/saddler/reporter/github/client.rb:53:in `create_pull_request_review_comment'
from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/saddler-reporter-github-0.1.4/lib/saddler/reporter/github/pull_request_review_comment.rb:29:in `block in report'
from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/saddler-reporter-github-0.1.4/lib/saddler/reporter/github/pull_request_review_comment.rb:28:in `each'
from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/saddler-reporter-github-0.1.4/lib/saddler/reporter/github/pull_request_review_comment.rb:28:in `report'
from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/saddler-0.1.1/lib/saddler/cli.rb:37:in `report'
from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/saddler-0.1.1/exe/saddler:5:in `<top (required)>'
from /home/travis/.rvm/gems/ruby-1.9.3-p551/bin/saddler:23:in `load'
from /home/travis/.rvm/gems/ruby-1.9.3-p551/bin/saddler:23:in `<main>'
from /home/travis/.rvm/gems/ruby-1.9.3-p551/bin/ruby_executable_hooks:15:in `eval'
from /home/travis/.rvm/gems/ruby-1.9.3-p551/bin/ruby_executable_hooks:15:in `<main>'
Hi, thanks for this great tool.
I got an error below on my Jenkins(with GitHub pull request builder plugin, and reporter is PullRequestReviewComment)
E, [2016-05-12T17:39:45.412533 #44380] ERROR -- Saddler: reporter
E, [2016-05-12T17:39:45.412593 #44380] ERROR -- Saddler: #<Saddler::Reporter::Github::PullRequestReviewComment:0x007f97fcb016c0 @output=#<IO:<STDOUT>>>
/Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/git-1.3.0/lib/git/lib.rb:937:in `command': git '--git-dir=/Users/myuser/.jenkins/jobs/liverpool-android-pull-request/workspace/.git' '--work-tree=/Users/myuser/.jenkins/jobs/liverpool-android-pull-request/workspace' cat-file '-t' '' 2>&1:fatal: Not a valid object name (Git::GitExecuteError)
from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/git-1.3.0/lib/git/lib.rb:166:in `object_type'
from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/git-1.3.0/lib/git/object.rb:301:in `new'
from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/git-1.3.0/lib/git/base/factory.rb:53:in `object'
from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/saddler-reporter-support-git-1.0.0/lib/saddler/reporter/support/git/repository.rb:72:in `tracking'
from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/saddler-reporter-support-git-1.0.0/lib/saddler/reporter/support/git/repository.rb:64:in `block in merging_object'
from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/saddler-reporter-support-git-1.0.0/lib/saddler/reporter/support/git/repository.rb:63:in `select'
from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/saddler-reporter-support-git-1.0.0/lib/saddler/reporter/support/git/repository.rb:63:in `merging_object'
from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/saddler-reporter-support-git-1.0.0/lib/saddler/reporter/support/git/repository.rb:52:in `merging_sha'
from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/saddler-reporter-github-1.0.0/lib/saddler/reporter/github/client.rb:69:in `block in pull_request_patches'
from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/saddler-reporter-github-1.0.0/lib/saddler/reporter/github/client.rb:68:in `each'
from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/saddler-reporter-github-1.0.0/lib/saddler/reporter/github/client.rb:68:in `pull_request_patches'
from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/saddler-reporter-github-1.0.0/lib/saddler/reporter/github/pull_request_review_comment.rb:23:in `report'
from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/saddler-1.0.0/lib/saddler/cli.rb:37:in `report'
from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/saddler-1.0.0/exe/saddler:5:in `<top (required)>'
from /Users/myuser/.rbenv/versions/2.0.0-p247/bin/saddler:23:in `load'
from /Users/myuser/.rbenv/versions/2.0.0-p247/bin/saddler:23:in `<main>'
after digging it for a while, it seems like target branch name was unseeable from saddler.
but when I run echo $ghprbTargetBranch
, it prints master
any idea how to solve this?
$ saddler generate rubocop #=> generate bin/build-rubocop.sh
$ saddler generate eslint #=> generate bin/build-eslint.sh
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.