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
69
【Go言語】テスト
tomo1227
0
40
【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
複数アプリケーションを育てていくための共通化戦略
irof
9
3.6k
FormFlow - Build Stunning Multistep Forms
yceruto
1
130
KotlinConf 2025 現地で感じたServer-Side Kotlin
n_takehata
1
160
「ElixirでIoT!!」のこれまでとこれから
takasehideki
0
320
F#で自在につくる静的ブログサイト - 関数型まつり2025
pizzacat83
0
270
Gleamという選択肢
comamoca
6
620
Zennの運営完全に理解した #完全に理解したTalk
wadayusuke
1
180
実践ArchUnit ~実例による検証パターンの紹介~
ogiwarat
2
230
Spring gRPC で始める gRPC 入門 / Introduction to gRPC with Spring gRPC
mackey0225
2
450
eBPFを用いたAIネットワーク監視システム論文の実装 / eBPF Japan Meetup #4
yuukit
3
720
インターフェース設計のコツとツボ
togishima
2
680
統一感のある Go コードを生成 AI の力で手にいれる
otakakot
0
2.5k
Featured
See All Featured
Done Done
chrislema
184
16k
Embracing the Ebb and Flow
colly
85
4.7k
Designing for Performance
lara
609
69k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
870
Code Review Best Practice
trishagee
68
18k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
252
21k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.3k
Automating Front-end Workflow
addyosmani
1370
200k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
32
5.9k
Balancing Empowerment & Direction
lara
1
110
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
YesSQL, Process and Tooling at Scale
rocio
172
14k
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