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
【Go言語】golangci-lintの使い方
Search
Tomoki Ota
July 04, 2024
Programming
1
4.1k
【Go言語】golangci-lintの使い方
golangci-lintの使い方についてまとめました。
【Qiita】
https://qiita.com/twrcd1227/items/9d62a5ac58232d99b656
Tomoki Ota
July 04, 2024
Tweet
Share
More Decks by Tomoki Ota
See All by Tomoki Ota
アーキテクチャの価値
tomo1227
0
70
アーキテクチャとビジネスロジック
tomo1227
0
75
【Go言語】テスト
tomo1227
0
42
【Go言語】クロージャ
tomo1227
0
230
【Go言語】イテレータ
tomo1227
0
54
【Go言語】エラーハンドリング
tomo1227
0
50
AIに淘汰されないようにするには?
tomo1227
0
45
【Go言語】range
tomo1227
0
45
【Go言語】break
tomo1227
0
52
Other Decks in Programming
See All in Programming
今ならAmazon ECSのサービス間通信をどう選ぶか / Selection of ECS Interservice Communication 2025
tkikuc
20
3.8k
VS Code Update for GitHub Copilot
74th
1
550
A2A プロトコルを試してみる
azukiazusa1
2
1.3k
#kanrk08 / 公開版 PicoRubyとマイコンでの自作トレーニング計測装置を用いたワークアウトの理想と現実
bash0c7
1
660
AWS CDKの推しポイント 〜CloudFormationと比較してみた〜
akihisaikeda
3
320
システム成長を止めない!本番無停止テーブル移行の全貌
sakawe_ee
1
150
Flutterで備える!Accessibility Nutrition Labels完全ガイド
yuukiw00w
0
140
GraphRAGの仕組みまるわかり
tosuri13
8
510
Go1.25からのGOMAXPROCS
kuro_kurorrr
1
840
5つのアンチパターンから学ぶLT設計
narihara
1
140
LT 2025-06-30: プロダクトエンジニアの役割
yamamotok
0
660
Composerが「依存解決」のためにどんな工夫をしているか #phpcon
o0h
PRO
1
250
Featured
See All Featured
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
720
Being A Developer After 40
akosma
90
590k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
8
680
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
800
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
5.9k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
281
13k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
940
Fireside Chat
paigeccino
37
3.5k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.5k
Transcript
Tomoki Ota ʲGoݴޠʳ golangci-lintͷ͍ํ
golangci-lintͱ Πϯετʔϧํ๏ ༻ํ๏ɾઃఆํ๏ Github Action ΞδΣϯμ 2
golangci-lint
golangci-lint ʹɺgofmt, goimports, govetͳͲ 100Ҏ্ͷϦϯλʔ͕ೖ͍ͬͯΔɻ 4 golangci-lintͱ
Πϯετʔϧ curlͰΠϯετʔϧ͢Δͷ͕Φεεϝ 5
Πϯετʔϧ brew 6
brewʹ࠷৽൛͕ͳ͚Εɺbrew tapΛ͏ Πϯετʔϧ 7
go install XXXඇਪ Πϯετʔϧ 8
Πϯετʔϧ 9
όʔδϣϯ֬ೝ 10
࣮ߦ 11
࣮ߦ લͷϖʔδͱಉ͡ 12
࣮ߦ(ϑΝΠϧɾσΟϨΫτϦࢦఆ) 13
࣮ߦ(LinterΛࢦఆ) 14
DEBUG -v Λ͚ͭΔ 15
DEBUG ڥมGL_DEBUGʹλάΛࢦఆ͢Δͱ ΑΓৄࡉͳDEBUG͕Ͱ͖Δ 16
DEBUG https://github.com/golangci/golangci-lint/blob/master/pkg/logutils/logutils.go
༗ޮͳϦϯλʔͷ֬ೝ https://golangci-lint.run/usage/linters/
༗ޮͳϦϯλʔͷ֬ೝ
༗ޮͳϦϯλʔͷ֬ೝ
ઃఆϑΝΠϧ .golangci.yml .golangci.yaml .golangci.toml .golangci.json
ઃఆϑΝΠϧ
ઃఆϑΝΠϧ https://gist.github.com/maratori/47a4d00457a92aa426dbd48a18776322# f ile-golangci-yml
VSCodeͷઃఆ --fastΛઃఆ͠ͳ͍ͱΤσΟλ͕མͪΔՄೳੑ͕͋Δ https://golangci-lint.run/welcome/integrations/
Github Action
golangci/golangci-lint-action
reviewdog/action-golangci-lint
reviewdog/action-golangci-lint