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
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
380
Writing faster Redis client
olegkovalov
0
190
Moments before main()
olegkovalov
0
93
За пару мгновений до main() [RUS]
olegkovalov
1
610
Bencode - serializer and deserializer in Go
olegkovalov
0
630
impguard - protect your project structure
olegkovalov
0
740
Versioning
olegkovalov
0
130
Modifiability
olegkovalov
0
130
Server-Sent Events in Go
olegkovalov
0
890
Other Decks in Programming
See All in Programming
Codexに役割を持たせる 他のAIエージェントと組み合わせる実務Tips
o8n
4
1.4k
PHP 7.4でもOpenTelemetryゼロコード計装がしたい! / PHPerKaigi 2026
arthur1
1
410
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
660
メッセージングを利用して時間的結合を分離しよう #phperkaigi
kajitack
3
330
Strategy for Finding a Problem for OSS: With Real Examples
kibitan
0
110
Fundamentals of Software Engineering In the Age of AI
therealdanvega
2
290
Symfony + NelmioApiDocBundle を使った スキーマ駆動開発 / Schema Driven Development with NelmioApiDocBundle
okashoi
0
230
モダンOBSプラグイン開発
umireon
0
180
Laravel Nightwatchの裏側 - Laravel公式Observabilityツールを支える設計と実装
avosalmon
1
240
Claude Code Skill入門
mayahoney
0
430
野球解説AI Agentを開発してみた - 2026/02/27 LayerX社内LT会資料
shinyorke
PRO
0
370
OTP を自動で入力する裏技
megabitsenmzq
0
130
Featured
See All Featured
Agile that works and the tools we love
rasmusluckow
331
21k
Statistics for Hackers
jakevdp
799
230k
Practical Orchestrator
shlominoach
191
11k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
91
Designing for Performance
lara
611
70k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
64
54k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.1k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.1k
Abbi's Birthday
coloredviolet
2
5.7k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
240
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
130
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
86
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