Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Analyze your changeset in a branch before git p...
Search
Janos Gyerik
December 08, 2016
Technology
0
650
Analyze your changeset in a branch before git push using SonarLint + Git hooks; Round #2
Janos Gyerik
December 08, 2016
Tweet
Share
More Decks by Janos Gyerik
See All by Janos Gyerik
Capture The Flag at SonarSource 2019
janosgyerik
1
44
Keyboard shortcuts
janosgyerik
0
140
Analyze your changeset in a branch before git push using SonarLint + Git hooks
janosgyerik
0
360
Unwatch GitHub repos
janosgyerik
0
320
Code Reviews
janosgyerik
0
150
Playing with Yahoo! Pipes
janosgyerik
0
260
Cool features of GitHub
janosgyerik
0
1.3k
Time-saving tricks on the command line
janosgyerik
1
4.3k
Other Decks in Technology
See All in Technology
ブラウザ拡張のセキュリティの話 / Browser Extension Security
flatt_security
0
220
mablでリグレッションテストをデイリー実行するまで #mablExperience
bengo4com
0
440
"なるべくスケジューリングしない" を実現する "PreferNoSchedule" taint
superbrothers
0
120
生成AIシステムとAIエージェントに関する性能や安全性の評価
shibuiwilliam
2
280
その意思決定、まだ続けるんですか? ~痛みを超えて未来を作る、AI時代の撤退とピボットの技術~
applism118
45
25k
経営から紐解くデータマネジメント
pacocat
9
1.7k
あなたの知らないDateのひみつ / The Secret of "Date" You Haven't known #tqrk16
expajp
0
100
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
5
46k
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
3.2k
re:Invent2025とAWS Builder Cards Resilience Expansionのご紹介
tsuwa61
1
120
AI開発の定着を推進するために揃えるべき前提
suguruooki
1
450
Android Studio Otter の最新 Gemini 機能 / Latest Gemini features in Android Studio Otter
yanzm
0
500
Featured
See All Featured
Unsuck your backbone
ammeep
671
58k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.8k
Site-Speed That Sticks
csswizardry
13
970
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Speed Design
sergeychernyshev
33
1.3k
The Cult of Friendly URLs
andyhume
79
6.7k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
Mobile First: as difficult as doing things right
swwweet
225
10k
Art, The Web, and Tiny UX
lynnandtonic
303
21k
Building Applications with DynamoDB
mza
96
6.8k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Transcript
ANALYZE YOUR CHANGESET BEFORE GIT PUSH WITH SONARLINT + GIT
HOOKS ROUND #2 https://speakerdeck.com/janosgyerik/sonarlint-before-git-push-2
Recap
Motivation * Changeset = branch = many commits * Automatic
(+bypass)
git clone https://github.com/janosgyerik/sonarlint-git-hooks cd sonarlint-git-hooks ./get-and-setup-sonarlint.sh hooks=$PWD cd /path/to/your/project $hooks/install.sh
Setup
Difference from sonar-github * Runs locally * Fast feedback *
No-brainer setup
Difference from pre-commit checks in IntelliJ * Many commits vs
one * Less frequent * IntelliJ not needed
“custom” sonarlint? custom == future
None
Tip #1 : bypass the analysis SKIPSONARLINT=1 git push -u
origin HEAD
Tip #2 : git alias to bypass the analysis somename
= "!f() { SKIPSONARLINT=1 git push -u origin HEAD \"$@\"; }; f"
Tip #3 : enable pre-commit hook mv .git/hooks/pre-commit.optional .git/hooks/pre-commit
https://github.com/janosgyerik/sonarlint-git-hooks/issues Problems? Ideas? Feature requests?