Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Rocro Inspecode Hands On with Bitbucket
Search
Yoshiyuki Mineo
November 01, 2017
Technology
0
110
Rocro Inspecode Hands On with Bitbucket
Bitbucket + Rocro Hands-On Seminar 2017/11/01
Yoshiyuki Mineo
November 01, 2017
Tweet
Share
More Decks by Yoshiyuki Mineo
See All by Yoshiyuki Mineo
GCP を活用してスケーラブルな CI サービスを作った話
yoshiyukimineo
0
170
開発者向けSaaS Rocro
yoshiyukimineo
0
730
Rocro Inspecode Hands On
yoshiyukimineo
0
520
RocroにおけるGCP活用事例
yoshiyukimineo
0
960
Other Decks in Technology
See All in Technology
Git scrapingで始める継続的なデータ追跡 / Git Scraping
ohbarye
4
140
Evolving Architecture
rainerhahnekamp
3
240
カップ麺の待ち時間(3分)でわかるPartyRockアップデート
ryutakondo
0
110
Amazon Q Developerで.NET Frameworkプロジェクトをモダナイズしてみた
kenichirokimura
1
170
When Windows Meets Kubernetes…
pichuang
0
280
東京Ruby会議12 Ruby と Rust と私 / Tokyo RubyKaigi 12 Ruby, Rust and me
eagletmt
1
430
プロダクト組織で取り組むアドベントカレンダー/Advent Calendar in Product Teams
mixplace
0
680
KMP with Crashlytics
sansantech
PRO
0
180
30分でわかる「リスクから学ぶKubernetesコンテナセキュリティ」/30min-k8s-container-sec
mochizuki875
3
400
AI×医用画像の現状と可能性_2024年版/AI×medical_imaging_in_japan_2024
tdys13
1
1.3k
12 Days of OpenAIから読み解く、生成AI 2025年のトレンド
shunsukeono_am
0
1.1k
Kotlin Multiplatformのポテンシャル
recruitengineers
PRO
1
110
Featured
See All Featured
Gamification - CAS2011
davidbonilla
80
5.1k
Building Your Own Lightsaber
phodgson
104
6.2k
Building Better People: How to give real-time feedback that sticks.
wjessup
366
19k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.6k
Automating Front-end Workflow
addyosmani
1366
200k
For a Future-Friendly Web
brad_frost
176
9.5k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Music & Morning Musume
bryan
46
6.3k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
YesSQL, Process and Tooling at Scale
rocio
170
14k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
Transcript
ROCRO INSPECODE ハンズオン Bitbucket編 Rocro株式会社 峯尾 嘉征 2017/11/01
• 開発者向けサービス群 • https://rocro.com • GitHub / Bitbucketと連携 • 9/14
public beta開始 • 名前の由来 • アジャイル開発:イテレーションを回しながらソフトウェアをつくる • 回転させながらものをつくる道具 → ろくろ 2
Inspecode • 自動コードレビュー&コード修正サービス • 約50種類の静的解析ツールをサポート • 一部の言語でユニットテストもサポート開始 • サポート言語: C,
C++, Clojure, CoffeeScript, CSS, Go, HTML, Java, JavaScript, PHP, Python, Ruby, Scala, Shell, TypeScriptなど • Public Beta 3
What's New • 下記ツールを新規にサポート • Tailor(Swift) • Prospector(Python) • Prettier(CSS/JavaScript/TypeScript)
• Unused(多言語対応) • Public Repositoryへの対応 • Bitbucketでも自動修正機能をサポート • レポートバッジ(詳細は後述) • Fixedステータス(詳細は後述) 4
ハンズオン資料 https://bitbucket.org/your-team/inspecode-hands-on 5 https://bitbucket.org/your-team/inspecode-hands- on/downloads/inspecode-hands-on-bitbucket_jp.pdf Click “ダウンロード” Download pdf
Agenda • セットアップと基本的な使い方 • rocro.ymlの追加 • 自動修正 • 入力分割 •
バッジ 6
セットアップと基本的な使い⽅ 7
https://bitbucket.org/your-team/inspecode-hands- on を Fork ① Click “+” mark 8
https://bitbucket.org/your-team/inspecode-hands- on を Fork ② Click “Fork this repository” 9
https://bitbucket.org/your-team/inspecode-hands- on を Fork ③ Click 10
inspecode.rocro.com からサインイン Sign in with BitBucket 11
Authorize ROCRO Click 12
Repositories ページに移動 Click “Repositories” 13
レポジトリを登録 2. Back to “Reports” 1. Register “inspecode-hands-on” repository 14
※repositoryが現れない場合は、右上の”Sync”ボタンを押してください
Report が生成されることを確認 15
Report Summaryを表示① Click “Report” 16
Report Summaryを表示② 17
File一覧を表示① Click “D” bar 18
File一覧を表示② ※「Filesタブ→プルダウンメニューでGrade Dを選択」 でも同じ画⾯に⾏けます。 19
特定ファイルのIssue一覧を表示① Click 20
特定ファイルのIssue一覧を表示② 21
特定ファイルのIssue出現箇所を確認① Click “Source” 22
特定ファイルのIssue出現箇所を確認② 23
Jobの履歴を表示① 24 Click “History”
Jobの履歴を表示② 25
Jobの詳細を表示① Click 26
Jobの詳細を表示② Click “golint” 27
Jobの詳細を表示③ golintのコンソールログを確認 28
rocro.ymlの追加 29
rocro.yml inspecode: gofmt: thresholds: num-issues: 0 options: [-s] go-test: thresholds:
num-issues: 0 misspell: default golint: default rocro.ymlにより様々な設定が可能 左のrocro.ymlは、gofmt, golintで 1つでもissueが検出されたら Jobをfailさせる設定 Note: Notificationsの設定で “Only failure and recovery” を選択すると Jobのfailに気づきやすくなる 30 https://inspecode.rocro.com/help/configuration/tool.html#field-thresholds
rocro-ymlブランチをマージ① Click “ブランチ” 31
rocro-ymlブランチをマージ② Click “rocro-yml” 32
rocro-ymlブランチをマージ③ Click “マージ” 33
rocro-ymlブランチをマージ④ Click “マージ” 34
Threshold設定によりJobがFailしたことを確認① 35 Click “History”
Threshold設定によりJobがFailしたことを確認② 36 Click
Threshold設定によりJobがFailしたことを確認③ 37 gofmtがfailしたのを確認
自動修正 38
rocro.yml inspecode: gofmt: thresholds: num-issues: 0 options: [-s] auto-fix: true
go-test: thresholds: num-issues: 0 misspell: default golint: default gofmtのauto-fixを有効にして 先程のgofmt errorを自動的に修正する 39 https://inspecode.rocro.com/help/configuration/tool.html#field-auto-fix
auto-fixブランチをマージ① 40 Click “ブランチ”
auto-fixブランチをマージ② 41 Click “auto-fix”
auto-fixブランチをマージ③ 42 Click “マージ”
auto-fixブランチをマージ④ 43 Click “マージ”
Report Summaryを表示 2. Click “Report” 44 1. Click “Reports”
レポート画面からブランチ画面を表示 Click “Compare” 45 ※“Compare”が表⽰されない場合は、“History”から 最新のJobを選択して”View Report”ボタンを押してください
master@inspecode を master にマージ① Create ”マージ” 46
master@inspecode を master にマージ② Create ”マージ” 47
コミット履歴から Report Summary を表示① 48 Click “コミット”
コミット履歴から Report Summary を表示② 49 Click green icon
修正された Issues を確認① Click “Number of Fixed Issues” 50
修正された Issues を確認② 51
自動修正によりFailed→Succeededになったことを確認① Click “History” 52
自動修正によりFailed→Succeededになったことを確認② 53 Click
自動修正によりFailed→Succeededになったことを確認③ 54
入力分割 55
rocro.yml inspecode: gofmt: thresholds: num-issues: 0 options: [-s] auto-fix: true
go-test: thresholds: num-issues: 0 misspell: default golint: - input: c* - ignore: c* golintの入力を分割して 並列化・高速化する ”c”で始まるファイル群と それ以外のファイル群に2分割 56
参考:Multiple Configurations 57 inspecode: <tool>: input: <pattern> ignore: <pattern> https://inspecode.rocro.com/help/configuration/tool.html#multiple-configurations
inspecode: <tool>: - input: <pattern> ignore: <pattern> - input: <pattern> ignore: <pattern> Single Configuration inputで入力パターンを指定(複数可) ignoreで除外パターンを指定(複数可) Multiple Configurations リスト形式で複数のconfigurationを 記述可能
divide-inputブランチをマージ① 58 Click “ブランチ”
divide-inputブランチをマージ② 59 Click “auto-fix”
divide-inputブランチをマージ③ 60 Click “マージ”
divide-inputブランチをマージ④ 61 Click “マージ”
golintが分割・並列実行されたことを確認① 62 Click “History”
golintが分割・並列実行されたことを確認② 63 Click
golintが分割・並列実行されたことを確認③ 64
バッジ 65
バッジ • READMEに貼るアイコン • ステータスバッジ • 最新のジョブのステータス(Succeeded, Failedなど)を表示 • クリックすると最新のジョブの詳細画面へジャンプ
• レポートバッジ • 最新のレポートの5段階評価(A, B, C, D, F)を表示 • クリックすると最新のレポート画面へジャンプ 66
Settings 画面を開く Click “Settings” 67
Badges 画面を開く Click “Badges” 68
Markdownスニペットをコピー Copy this snippet 69
README.mdを編集① Click “ソース” 70
README.mdを編集② Click “README.md” 71
README.mdを編集③ Click “編集” 72
README.mdを編集④ 1. コピーしたスニペットを 8⾏⽬に貼り付ける 2. Click “コミット” 73
README.mdを編集⑤ Click “コミット” 74
レポートバッジを確認① Click “ファイルを表⽰” 75
レポートバッジを確認② バッジが表⽰される 76