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
CircleCI Go Code Inspection
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Kazuki Higashiguchi
May 28, 2019
Technology
730
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
CircleCI Go Code Inspection
GoプロジェクトでのCircleCIによるコード検査 について #circlecijp
Kazuki Higashiguchi
May 28, 2019
More Decks by Kazuki Higashiguchi
See All by Kazuki Higashiguchi
Practical Monitoring for Knative Serving / KubeCon + CloudNativeCon Japan 2025
hgsgtk
0
110
Cell-Based Architecture Design in AWS
hgsgtk
1
240
インフラコストとセキュリティ課題解決のためのリアーキテクチャリング / srekaigi2025
hgsgtk
3
8.5k
Design of a Stateful system for Robust Deployment and Observability
hgsgtk
0
1.5k
A guide to joining operational work in your new DevOps team
hgsgtk
1
1.6k
HTTP Tunneling in Go
hgsgtk
0
1.6k
ブラウザ自動操作技術の深層へ、直接触れて学ぶ WebDriver と Chrome DevTools Protocol
hgsgtk
3
7k
HTTP Server on random available port in Go
hgsgtk
0
1.2k
Agile Testingを夢見たテスト自動化 〜ATDDへの挑戦から始まる 1年間の試行錯誤〜 / dreaming agile testing at basebank
hgsgtk
13
8.5k
Other Decks in Technology
See All in Technology
LLMと共に進化するプロセスを目指して
ymatsuwitter
12
3.7k
Building applications in the Gemini API family.
line_developers_tw
PRO
0
2.4k
AI駆動開発が変える、大規模開発の前提 ーHuman in the Loop から Human on the Loop へ / AIE2026
visional_engineering_and_design
30
22k
製造業のクラウド活用最適解〜AI,DXを加速するデータ基盤の作り方〜
hamadakoji
0
420
noUncheckedIndexedAccess、3時間、1万円。 / noUncheckedIndexedAccess, 3 Hours, 10,000 JPY.
kaonavi
1
340
[モダンアプリ勉強会]今更聞けないGit/GitHub入門
tsukuboshi
0
310
Dario Amodi『Policy on the AI Exponential』を理解する
nagatsu
0
210
あなたの AI ワークスペースに、 専門コーダーを連れてくる - Amazon Quick Desktop 最新情報
kawaji_scratch
1
120
自律型AIエージェントは何を破壊するのか
kojira
0
130
AIを「創る」と「使う」の循環 — HRテックが実践するリアルなAI組織実装
taketo957
0
1.8k
ブロックチェーン / Blockchain
ks91
PRO
0
110
GoとSIMDとWasmの今。
askua
3
520
Featured
See All Featured
Side Projects
sachag
455
43k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
940
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.8k
Chasing Engaging Ingredients in Design
codingconduct
0
210
Code Review Best Practice
trishagee
74
20k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.5k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
850
How to make the Groovebox
asonas
2
2.2k
Designing Experiences People Love
moore
143
24k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.2k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
420
Transcript
© - BASE, Inc. X Goプロジェクトでの CircleCIによるコード検査 . . #circlecijp-
@hgsgtk
© - BASE, Inc. : @hgsgtk ⾃⼰紹介 東⼝ 和暉 (
Higashiguchi Kazuki ) サーバーサイドエンジニア BASE BANK, Inc CircleCIに チョットお世話になってます
© - BASE, Inc. このトークで得られること • GoプロジェクトにおけるCircleCIの活⽤事例 • 「どういうチェックしてる?」 •
Lint‧テスト実⾏する config.yml • 「実際、どう設定するの?」 • プロジェクトでのCircleCI活⽤⽅法振り返り知⾒ • 「こういう活⽤の仕⽅は良かった。」
© - BASE, Inc. お題⽬ • プロジェクトにおけるCircleCI利⽤の全体像 • コード検査を⾏うための config.yml
の中⾝ • CircleCIを利⽤したプロジェクトの振り返り
© - BASE, Inc. プロジェクトにおけるCircleCI利⽤の全体像 https://devblog.thebase.in/entry/ / / /
© - BASE, Inc. プロジェクトにおけるCircleCI利⽤の全体像 https://devblog.thebase.in/entry/ / / / このトークの
スコープ
© - BASE, Inc. 全体像 .circleci/config.yml (コード検査部分)
完全に理解 しましたね?
© - BASE, Inc. 全体像 .circleci/config.yml (コード検査部分) . 依存パッケージ解決 .
フォーマットチェック . Lintチェック . ビルド‧テスト . 循環複雑度計測
© - BASE, Inc. 1. 依存パッケージ解決 • Goの依存パッケージ関係 解決に Go
Modules を利 ⽤ • See also: https://circleci.com/ blog/go-v . -modules-and- circleci/ • circleci/golang >= . . を利⽤ • Go . MODULE = “on”
© - BASE, Inc. 2. フォーマットチェック • `go fmt`でフォーマット チェック
• ※ 依存パッケージ解決にて vendor ディレクトリが作成される場合は vendorは除く設定が必要。 • `go fmt`の結果をstderrへ
© - BASE, Inc. . Lintチェック • `golangci-lint run`の結果をstderrへ •
golangci-lint を利⽤ • GolangCI-Lint is a linters aggregator • See also: https://github.com/ golangci/golangci-lint
© - BASE, Inc. . Lintチェック - golangci-lintのconfig • 設定
.golangci.yml • 複数のチェックツールを まとめて実⾏することが できる
© - BASE, Inc. 4. ビルド‧テスト • `go build`にてビルド •
ビルドができるかをチェッ クする • `go test`にてテスト go test -p -race -cover ./...
© - BASE, Inc. 5. 循環複雑度計測 • 循環複雑度とは • ソフトウェ測定法の⼀つ
• プログラムの複雑度を測 る • fzipp/gocyclo を利⽤した 循環複雑度計測 • See also: https://github.com/ fzipp/gocyclo
© - BASE, Inc. CircleCIを利⽤したプロジェクトの振り返り • CIが開発者にGo流を教えてくれる • コードを書く前にlint‧テストを設定した •
チェックツールの追加に対する変更が発⽣ • golangci-lintは途中から⼊れた • (※ go vet/go importsと⼊れ替え) • 最初は思いつく限り多めに⼊れて、外していくのが いいと思う
© - BASE, Inc. 余談:デプロイパイプランについて知りたい⽅は https://devblog.thebase.in/entry/ / / /
© - BASE, Inc. 余談:デプロイパイプランについて知りたい⽅は https://devblog.thebase.in/entry/ / / / 「CircleCIとecspressoによるECSへのデプロイメントパイプライン」
https://devblog.thebase.in/entry/ / / /
Thanks