2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【Code Climate+ GitHub】10分でできる自動コード品質管理ツールの導入

Posted at

はじめに

本記事では自動でコードの品質管理を行ってくれるCode Climateの導入方法を解説します。特に、一人で開発をしていて自分の書いたコードをレビューしてくれる人がいないという方や、チームで開発をしているが、機械的にレビュー可能な部分は自動化することでレビューのコストを下げたいという方向けにツールの導入方法をお伝えします。

前提条件

  • GitHubのアカウントとパブリックリポジトリを作成している
  • GitHubの基本的な使い方を理解している

目次

  1. 導入手順
  2. 参考文献

導入手順

Code ClimateとGitHubを連携する

以下のリンクにアクセス

Sign up with Githubをクリック

image.png

Authorize codeclimateをクリック

image.png

もう一度Authorize codeclimateをクリック

image.png

Nextをクリック

image.png

Free for open source. Forever.のAdd a repositoryをクリック

image.png

Authorize codeclimate

image.png

品質管理の対象としたいリポジトリを選んでAdd Repoをクリック

image.png

Seee the Resultsをクリック

image.png

こんな感じでサマリーが表示されればokです

image.png

プルリクエストを作成したタイミングでフィードバックをもらえるようにする

Repo Settingをクリック

image.png

GitHubをクリック

image.png

Pull request comments のSet upをクリック

image.png

Installをクリック

image.png

先ほどの設定画面に戻りラジオボタンをオンにしてSaveボタンをクリック

image.png

Pull request status updatesのInstallをクリック

image.png

適当にPull Requestを作ってファイルの変更状態を確認すると以下のようにフィードバックが返ってきます(画像はコードが複雑すぎますという注意が書かれています)

image.png

これで自動コード品質管理ツールの導入は完了です

参考文献

本記事の作成にあたっては以下の記事を参考にしました

2
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?