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
5.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
96
アーキテクチャとビジネスロジック
tomo1227
0
95
【Go言語】テスト
tomo1227
0
55
【Go言語】クロージャ
tomo1227
0
270
【Go言語】イテレータ
tomo1227
0
72
【Go言語】エラーハンドリング
tomo1227
0
61
AIに淘汰されないようにするには?
tomo1227
0
60
【Go言語】range
tomo1227
0
66
【Go言語】break
tomo1227
0
63
Other Decks in Programming
See All in Programming
「10分以内に機能を消せる状態」 の実現のためにやっていること
togishima
1
270
アーキテクチャと考える迷子にならない開発者テスト
irof
7
2.2k
自動テストを活かすためのテスト分析・テスト設計の進め方/JaSST25 Shikoku
goyoki
2
590
競馬で学ぶ機械学習の基本と実践 / Machine Learning with Horse Racing
shoheimitani
7
6.4k
Kotlin 2.2が切り拓く: コンテキストパラメータで書く関数型DSLと新しい依存管理のかたち
knih
0
410
開発生産性が組織文化になるまでの軌跡
tonegawa07
0
140
Bakuraku E2E Scenario Test System Architecture #bakuraku_qa_study
teyamagu
PRO
0
700
AIの弱点、やっぱりプログラミングは人間が(も)勉強しよう / YAPC AI and Programming
kishida
9
3.8k
ビルドプロセスをデバッグしよう!
yt8492
0
290
Nitro v3
kazupon
2
280
Temporal Knowledge Graphで作る! 時間変化するナレッジを扱うAI Agentの世界
po3rin
5
1.3k
AI駆動開発ライフサイクル(AI-DLC)のホワイトペーパーを解説
swxhariu5
0
560
Featured
See All Featured
Speed Design
sergeychernyshev
32
1.2k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
24
1.6k
Designing for Performance
lara
610
69k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.3k
The Pragmatic Product Professional
lauravandoore
36
7k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
658
61k
Visualization
eitanlees
150
16k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
285
14k
Building Adaptive Systems
keathley
44
2.8k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.6k
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