Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
CircleCI Go Code Inspection
Search
Kazuki Higashiguchi
May 28, 2019
Technology
740
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
150
Cell-Based Architecture Design in AWS
hgsgtk
1
270
インフラコストとセキュリティ課題解決のためのリアーキテクチャリング / srekaigi2025
hgsgtk
3
8.7k
Design of a Stateful system for Robust Deployment and Observability
hgsgtk
0
1.6k
A guide to joining operational work in your new DevOps team
hgsgtk
1
1.7k
HTTP Tunneling in Go
hgsgtk
0
1.7k
ブラウザ自動操作技術の深層へ、直接触れて学ぶ WebDriver と Chrome DevTools Protocol
hgsgtk
3
7.1k
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
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
12k
Adaptive Warehouse を今すぐ導入すべき理由と迷ったときの判断基準
__allllllllez__
0
220
AIを活用するために決めた "やらないこと" - 価値に注目する / Not betting on AI
soudai
PRO
1
500
登壇の自信を奪う3匹のオバケ / 3 Ghosts That Rob You of Your Confidence in Public Speaking
pauli
8
840
Slack上でインフラをトラブルシュートする! Agentic Platform Engineeringの第一歩
teru0x1
4
1.6k
Geolonia の開発現場における AIの活用について
miya0001
0
100
DEFCON34-Write-up_HYCu-MYCu
daikiokazaki
0
160
Railsのように考える: See through the Master
snoozer05
PRO
1
140
人間はどの意思決定を手放せるのか
kawasima
14
5.8k
銀行勘定系システムにおける開発プロセス刷新×AIによる環境モダナイゼーション / Development Process Transformation and AI-Driven Environment Modernization
muit
0
1.7k
幾何アルゴリズムで なめらかなピン操作を / iOSDC Japan 2026 / smoothpin
kazumanagano
0
340
OpenTelemetry eBPF Instrumentationの舞台裏 / Behind the Scenes of OpenTelemetry eBPF Instrumentation
ymotongpoo
4
1.2k
Featured
See All Featured
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.8k
From π to Pie charts
rasagy
0
370
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
Scaling GitHub
holman
464
140k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
330
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.5k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
520
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Building Adaptive Systems
keathley
44
3.2k
Optimizing for Happiness
mojombo
378
71k
Accessibility Awareness
sabderemane
1
210
The World Runs on Bad Software
bkeepers
PRO
72
12k
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