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
7.8k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
【Go言語】golangci-lintの使い方
golangci-lintの使い方についてまとめました。
【Qiita】
https://qiita.com/twrcd1227/items/9d62a5ac58232d99b656
Tomoki Ota
July 04, 2024
More Decks by Tomoki Ota
See All by Tomoki Ota
アーキテクチャの価値
tomo1227
0
130
アーキテクチャとビジネスロジック
tomo1227
0
120
【Go言語】テスト
tomo1227
0
93
【Go言語】クロージャ
tomo1227
0
340
【Go言語】イテレータ
tomo1227
0
120
【Go言語】エラーハンドリング
tomo1227
0
95
AIに淘汰されないようにするには?
tomo1227
0
96
【Go言語】range
tomo1227
0
110
【Go言語】break
tomo1227
0
98
Other Decks in Programming
See All in Programming
Laravelで学ぶ Webアプリケーションチューニング入門/web_application_tuning_101
hanhan1978
4
1.3k
Generative UI & AI-Assistants for Your Angular Solutions
manfredsteyer
PRO
1
220
PHPだって関数型したい 〜できること、できないこと〜 / fp-in-php
jsoizo
1
240
地域 SRE コミュニティ最前線 - ホンマでっかSRE勉強会
tk3fftk
0
270
人間の目はかわらない、だからJPEGは30年もつ
yuzneri
7
12k
初めてのKubernetes 本番運用でハマった話
oku053
0
130
AIキャラアプリkaiwaの低遅延音声通話基盤をどう作ったか - AWS Gravitonで支える低遅延・低コストAI Agent基盤
mogamit
0
180
継続モナドとリアクティブプログラミング
yukikurage
3
640
任せる範囲はこう広がった / How the Scope of AI Delegation Has Expanded
nrslib
1
270
Built Our Own Background Agent at LayerX #aidevex_findy
layerx
PRO
8
3.3k
AI時代のPHPer生存戦略 ~「言語、もうなんでもよくない?」に本気で向き合う~
vivion
0
160
琵琶湖の水は止められてもNet--HTTPのリトライは止められない / You might be able to stop the water flow of Lake Biwa but you can't stop Net::HTTP retries
luccafort
PRO
0
440
Featured
See All Featured
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
520
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
370
The Pragmatic Product Professional
lauravandoore
37
7.4k
Utilizing Notion as your number one productivity tool
mfonobong
4
450
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
190
Amusing Abliteration
ianozsvald
1
240
How to make the Groovebox
asonas
2
2.3k
Marketing to machines
jonoalderson
1
5.6k
The Cult of Friendly URLs
andyhume
79
7k
Statistics for Hackers
jakevdp
799
230k
Designing for Performance
lara
611
70k
Facilitating Awesome Meetings
lara
57
7k
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