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
Kazuki Higashiguchi
May 28, 2019
Technology
730
1
Share
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
220
インフラコストとセキュリティ課題解決のためのリアーキテクチャリング / srekaigi2025
hgsgtk
3
8.4k
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.4k
Other Decks in Technology
See All in Technology
全社統制を維持しながら現場負担をどう減らすか〜プラットフォームチームとセキュリティチームで進めたSecurity Hub活用によるAWS統制の見直し〜/secjaws-security-hub-custom-insights
mhrtech
1
410
小さいVue.jsを30分で作る
hal_spidernight
0
150
サンプリングは「作る」のか「使う」のか? 分散トレースのコストと運用を両立する実践的戦略 / Why you need the tail sampling and why you don't want it
ymotongpoo
4
170
Gaussian Splattingの表現力を拡張する — 高周波再構成とインタラクションへのアプローチ —
gpuunite_official
0
150
要件定義の精度を高めるための型と生成AIの活用 / Using Types and Generative AI to Improve the Accuracy of Requirements Definition
haru860
0
320
『生成AI時代のクレデンシャルとパーミッション設計 — Claude Code を起点に』の執筆企画
takuros
3
2.3k
ServiceによるKubernetes通信制御ーClusterIPを例に
miku01
1
160
PdM・Eng・QAで進めるAI駆動開発の現在地/aidd-with-pdm-eng-qa
shota_kusaba
0
210
AIの揺らぎに“コシ”を与える階層化品質設計
ickx
0
270
20260513_生成AIを専属DSに_AI分析結果の検品テクニック_ハンズオン_交通事故データ
doradora09
PRO
0
220
会社説明資料|株式会社ギークプラス ソフトウェア事業部
geekplus_tech
0
220
そのSLO 99.9%、本当に必要ですか? 〜優先度付きSLOによる責任共有の設計思想〜 / Is that 99.9% SLO really necessary? Design philosophy of shared responsibility through prioritized SLOs
vtryo
0
600
Featured
See All Featured
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
550
For a Future-Friendly Web
brad_frost
183
10k
Statistics for Hackers
jakevdp
799
230k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
440
Building AI with AI
inesmontani
PRO
1
980
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Abbi's Birthday
coloredviolet
2
7.5k
AI: The stuff that nobody shows you
jnunemaker
PRO
6
630
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
210
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