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
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
AIで開発はどれくらい加速したのか?AIエージェントによるコード生成を、現場の評価と研究開発の評価の両面からdeep diveしてみる
daisuketakeda
1
2.5k
生成AIを使ったコードレビューで定性的に品質カバー
chiilog
1
270
humanlayerのブログから学ぶ、良いCLAUDE.mdの書き方
tsukamoto1783
0
190
20260127_試行錯誤の結晶を1冊に。著者が解説 先輩データサイエンティストからの指南書 / author's_commentary_ds_instructions_guide
nash_efp
1
970
AI時代の認知負荷との向き合い方
optfit
0
160
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
460
AIによる開発の民主化を支える コンテキスト管理のこれまでとこれから
mulyu
3
290
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
1.3k
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
430
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
650
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
7
2.8k
izumin5210のプロポーザルのネタ探し #tskaigi_msup
izumin5210
1
130
Featured
See All Featured
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
94
Everyday Curiosity
cassininazir
0
130
HDC tutorial
michielstock
1
380
YesSQL, Process and Tooling at Scale
rocio
174
15k
The Spectacular Lies of Maps
axbom
PRO
1
520
The Curious Case for Waylosing
cassininazir
0
240
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
940
Typedesign – Prime Four
hannesfritz
42
2.9k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.3k
Writing Fast Ruby
sferik
630
62k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
310
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