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
2.2k
【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
40
アーキテクチャとビジネスロジック
tomo1227
0
44
【Go言語】テスト
tomo1227
0
22
【Go言語】クロージャ
tomo1227
0
210
【Go言語】イテレータ
tomo1227
0
30
【Go言語】エラーハンドリング
tomo1227
0
33
AIに淘汰されないようにするには?
tomo1227
0
30
【Go言語】range
tomo1227
0
21
【Go言語】break
tomo1227
0
33
Other Decks in Programming
See All in Programming
『GO』アプリ バックエンドサーバのコスト削減
mot_techtalk
0
140
SpringBoot3.4の構造化ログ #kanjava
irof
2
1k
SwiftUIで単方向アーキテクチャを導入して得られた成果
takuyaosawa
0
270
ARA Ansible for the teams
kksat
0
150
ソフトウェアエンジニアの成長
masuda220
PRO
10
1.1k
GoとPHPのインターフェイスの違い
shimabox
2
190
SwiftUI Viewの責務分離
elmetal
PRO
1
240
How mixi2 Uses TiDB for SNS Scalability and Performance
kanmo
37
14k
Unity Android XR入門
sakutama_11
0
160
GAEログのコスト削減
mot_techtalk
0
120
Djangoアプリケーション 運用のリアル 〜問題発生から可視化、最適化への道〜 #pyconshizu
kashewnuts
1
250
AIの力でお手軽Chrome拡張機能作り
taiseiue
0
170
Featured
See All Featured
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Visualization
eitanlees
146
15k
Into the Great Unknown - MozCon
thekraken
35
1.6k
How to Think Like a Performance Engineer
csswizardry
22
1.3k
Bootstrapping a Software Product
garrettdimon
PRO
306
110k
Building an army of robots
kneath
303
45k
How GitHub (no longer) Works
holman
314
140k
Rails Girls Zürich Keynote
gr2m
94
13k
A designer walks into a library…
pauljervisheath
205
24k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2.1k
The Pragmatic Product Professional
lauravandoore
32
6.4k
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