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
3.8k
【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
60
アーキテクチャとビジネスロジック
tomo1227
0
68
【Go言語】テスト
tomo1227
0
39
【Go言語】クロージャ
tomo1227
0
220
【Go言語】イテレータ
tomo1227
0
49
【Go言語】エラーハンドリング
tomo1227
0
47
AIに淘汰されないようにするには?
tomo1227
0
42
【Go言語】range
tomo1227
0
38
【Go言語】break
tomo1227
0
49
Other Decks in Programming
See All in Programming
ktr0731/go-mcpでMCPサーバー作ってみた
takak2166
0
120
コードに語らせよう――自己ドキュメント化が内包する楽しさについて / Let the Code Speak
nrslib
6
1.3k
「兵法」から見る質とスピード
ickx
0
240
ワンバイナリWebサービスのススメ
mackee
10
7.6k
Practical Tips and Tricks for Working with Compose Multiplatform Previews (mDevCamp 2025)
stewemetal
0
110
生成AIで日々のエラー調査を進めたい
yuyaabo
0
250
プロダクト開発でも使おう 関数のオーバーロード
yoiwamoto
0
130
ドメインモデリングにおける抽象の役割、tagless-finalによるDSL構築、そして型安全な最適化
knih
5
1.2k
GoのWebAssembly活用パターン紹介
syumai
2
990
型付きアクターモデルがもたらす分散シミュレーションの未来
piyo7
0
550
Haskell でアルゴリズムを抽象化する / 関数型言語で競技プログラミング
naoya
10
1.5k
Webからモバイルへ Vue.js × Capacitor 活用事例
naokihaba
0
160
Featured
See All Featured
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.8k
Why You Should Never Use an ORM
jnunemaker
PRO
56
9.4k
Designing for Performance
lara
609
69k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.3k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
228
22k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Designing Experiences People Love
moore
142
24k
Rails Girls Zürich Keynote
gr2m
94
13k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
32
5.8k
BBQ
matthewcrist
89
9.7k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
50k
Building Better People: How to give real-time feedback that sticks.
wjessup
368
19k
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