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-critic
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Oleg Kovalov
September 25, 2018
Programming
0
54
go-critic
Oleg Kovalov
September 25, 2018
Tweet
Share
More Decks by Oleg Kovalov
See All by Oleg Kovalov
Hedged requests in Go
olegkovalov
0
360
Writing faster Redis client
olegkovalov
0
190
Moments before main()
olegkovalov
0
92
За пару мгновений до main() [RUS]
olegkovalov
1
610
Bencode - serializer and deserializer in Go
olegkovalov
0
620
impguard - protect your project structure
olegkovalov
0
730
Versioning
olegkovalov
0
130
Modifiability
olegkovalov
0
120
Server-Sent Events in Go
olegkovalov
0
890
Other Decks in Programming
See All in Programming
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
430
今から始めるClaude Code超入門
448jp
8
8.8k
余白を設計しフロントエンド開発を 加速させる
tsukuha
7
2.1k
ノイジーネイバー問題を解決する 公平なキューイング
occhi
0
100
組織で育むオブザーバビリティ
ryota_hnk
0
180
AI時代のキャリアプラン「技術の引力」からの脱出と「問い」へのいざない / tech-gravity
minodriven
21
7.2k
そのAIレビュー、レビューしてますか? / Are you reviewing those AI reviews?
rkaga
6
4.6k
QAフローを最適化し、品質水準を満たしながらリリースまでの期間を最短化する #RSGT2026
shibayu36
2
4.4k
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
180
Lambda のコードストレージ容量に気をつけましょう
tattwan718
0
130
AIエージェント、”どう作るか”で差は出るか? / AI Agents: Does the "How" Make a Difference?
rkaga
4
2k
20260127_試行錯誤の結晶を1冊に。著者が解説 先輩データサイエンティストからの指南書 / author's_commentary_ds_instructions_guide
nash_efp
1
970
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Marketing to machines
jonoalderson
1
4.6k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
450
Side Projects
sachag
455
43k
Practical Orchestrator
shlominoach
191
11k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
The Curse of the Amulet
leimatthew05
1
8.6k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
78
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
200
Discover your Explorer Soul
emna__ayadi
2
1.1k
Transcript
Go-critic Static analysis in Go by Oleg Kovalov
Why static analysis? - Better code - Human friendly -
Optimal code Good examples: - golint - go vet - gometalinter - golangci-lint - go-critic
Project status - 58 checks implemented + 54 in current
todo - Optimistic merging (10+ contributors)
Types of analysis - Diagnostics - Suspicious code - Code
style - Can be more readable - Performance - Can be faster
Diagnostic check: nilValReturn
Code style check: namedConst
Performance check: indexAlloc
Go-toolsmith - astfmt - Print ast.Node with %s - astp
- Predicates for AST nodes - astcopy - Deep copy for AST nodes - astequal - Deep equal for AST nodes - astinfo - Useful AST information - strparse - Parse string to AST Clickable link: github.com/go-toolsmith
Demo: problem description - strings.Index("<long string>", "i") vs - strings.IndexByte("<long
string>", 'i') BenchmarkIndex-4 100000000 19.3 ns/op BenchmarkIndexByte-4 100000000 16.4 ns/op
Make a new rule - go get go-critic - make
new <checker_name> - adding code examples (positive & negative) - copy-pasting coding - adding docs - git push - .... - PROFIT Code: https://bit.ly/2NDbOtV
Trophies Our trophies collection: go-critic.github.io/trophies.html
Thank you - github.com/go-critic/go-critic - github.com/go-toolsmith - twitter.com/oleg_kovalov - github.com/cristaloleg