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
Analyze your changeset in a branch before git p...
Search
Janos Gyerik
December 08, 2016
Technology
660
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Analyze your changeset in a branch before git push using SonarLint + Git hooks; Round #2
Janos Gyerik
December 08, 2016
More Decks by Janos Gyerik
See All by Janos Gyerik
Capture The Flag at SonarSource 2019
janosgyerik
1
45
Keyboard shortcuts
janosgyerik
0
150
Analyze your changeset in a branch before git push using SonarLint + Git hooks
janosgyerik
0
370
Unwatch GitHub repos
janosgyerik
0
320
Code Reviews
janosgyerik
0
160
Playing with Yahoo! Pipes
janosgyerik
0
280
Cool features of GitHub
janosgyerik
0
1.4k
Time-saving tricks on the command line
janosgyerik
1
4.4k
Other Decks in Technology
See All in Technology
サービス内で複数のOP・ASを連鎖させる(OAuth/OIDC Numa (Immersion) Workshop 2026)
oidfj
PRO
0
140
Bill One 開発エンジニア 紹介資料
sansan33
PRO
7
20k
도구에서 동료까지: 10년차 AI 스타트업의 AI 적응기
inureyes
PRO
1
350
Kiro5兄弟のいまどきのセキュリティ基礎知識
kentapapa
0
100
ハッカソンで入賞した話 @ Findy LT
asari194617
0
1.5k
Introduction to Sansan, inc / Sansan Global Development Center, Inc.
sansan33
PRO
0
3.2k
AI開発に用いられるHPC技術について
gpuunite_official
0
280
ブラウザで変わるID連携(OAuth/OIDC Numa (Immersion) Workshop 2026)
oidfj
PRO
0
140
Master Dataグループ紹介資料
sansan33
PRO
1
4.8k
1.5時間を無駄にして学んだwsl2におけるaptとsnapの選択と仕組み
yosaka0123
0
430
VLMで2.3万枚のPyCon JP写真を検索!
terapyon
1
480
英語が話せなくてもKubeConスタッフに参加した話
yusuke427
2
1.1k
Featured
See All Featured
Paper Plane
katiecoart
PRO
2
53k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
310
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.9k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
380
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
520
The SEO Collaboration Effect
kristinabergwall1
1
530
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
64
56k
A designer walks into a library…
pauljervisheath
211
24k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
260
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
290
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?