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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Kazuki Higashiguchi
May 28, 2019
Technology
1
720
CircleCI Go Code Inspection
GoプロジェクトでのCircleCIによるコード検査 について #circlecijp
Kazuki Higashiguchi
May 28, 2019
Tweet
Share
More Decks by Kazuki Higashiguchi
See All by Kazuki Higashiguchi
Practical Monitoring for Knative Serving / KubeCon + CloudNativeCon Japan 2025
hgsgtk
0
94
Cell-Based Architecture Design in AWS
hgsgtk
1
210
インフラコストとセキュリティ課題解決のためのリアーキテクチャリング / srekaigi2025
hgsgtk
3
8.1k
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
6.9k
HTTP Server on random available port in Go
hgsgtk
0
1.2k
Agile Testingを夢見たテスト自動化 〜ATDDへの挑戦から始まる 1年間の試行錯誤〜 / dreaming agile testing at basebank
hgsgtk
13
8.4k
Other Decks in Technology
See All in Technology
(Test) ai-meetup slide creation
oikon48
3
420
20260311 技術SWG活動報告(デジタルアイデンティティ人材育成推進WG Ph2 活動報告会)
oidfj
0
360
コンテキスト・ハーネスエンジニアリングの現在
hirosatogamo
PRO
3
210
Claude Code 2026年 最新アップデート
oikon48
13
10k
Everything Claude Code を眺める
oikon48
9
5.9k
AI時代のSaaSとETL
shoe116
1
170
JAWS DAYS 2026 ExaWizards_20260307
exawizards
0
440
組織全体で実現する標準監視設計
yuobayashi
3
490
ランサムウエア対策してますか?やられた時の対策は本当にできてますか?AWSでのリスク分析と対応フローの泥臭いお話。
hootaki
0
150
The_Evolution_of_Bits_AI_SRE.pdf
nulabinc
PRO
0
230
Dr. Werner Vogelsの14年のキーノートから紐解くエンジニアリング組織への処方箋@JAWS DAYS 2026
p0n
1
140
決済サービスを支えるElastic Cloud - Elastic Cloudの導入と推進、決済サービスのObservability
suzukij
2
650
Featured
See All Featured
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.8k
Utilizing Notion as your number one productivity tool
mfonobong
4
260
The Invisible Side of Design
smashingmag
302
51k
Amusing Abliteration
ianozsvald
0
130
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
400
Darren the Foodie - Storyboard
khoart
PRO
3
2.9k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
220
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
750
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
140
Navigating Weather and Climate Data
rabernat
0
140
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
130
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.1k
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