Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
go-critic
Search
Oleg Kovalov
September 25, 2018
Programming
75
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
go-critic
Oleg Kovalov
September 25, 2018
More Decks by Oleg Kovalov
See All by Oleg Kovalov
Embedded Postgres in Go
olegkovalov
0
85
Hedged requests in Go
olegkovalov
0
440
Writing faster Redis client
olegkovalov
0
240
Moments before main()
olegkovalov
0
120
За пару мгновений до main() [RUS]
olegkovalov
1
660
Bencode - serializer and deserializer in Go
olegkovalov
0
690
impguard - protect your project structure
olegkovalov
0
780
Versioning
olegkovalov
0
150
Modifiability
olegkovalov
0
150
Other Decks in Programming
See All in Programming
iOSDC2026登壇資料.pdf
riofujimon
0
200
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
830
AGENTS.md Is Not Enough:Build Skills, Don't Download Them
lx_t
0
130
APNsからLive Activityを開始する話
yumnumm
0
140
パズルゲームの作り方 / how to make puzzle games
kaityo256
PRO
2
260
仕様駆動開発による爆速プロダクト開発 / Bakusoku Spec Driven Development
kobakei
0
160
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Rails World 2026, Austin, Texas
marcoroth
0
150
KiroのSpecで「五目並べ」を作ってみる
satoshi256kbyte
1
330
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
120
Webの地図
yosuke_furukawa
PRO
6
5k
スマートフォンでモールス信号を送受信する 〜スマートフォンのLEDとカメラで作る光通信の設計と実装〜
atsuki_seo
0
220
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
460
Featured
See All Featured
BBQ
matthewcrist
89
10k
Faster Mobile Websites
deanohume
310
32k
Documentation Writing (for coders)
carmenintech
77
5.6k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
A better future with KSS
kneath
240
18k
Bash Introduction
62gerente
615
220k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
270
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
560
Exploring anti-patterns in Rails
aemeredith
4
520
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
570
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