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
エンジニアリングマネージャー はじめての目標設定と評価
halkt
0
280
Karate+Database RiderによるAPI自動テスト導入工数をCline+GitLab MCPを使って2割削減を目指す! / 20251206 Kazuki Takahashi
shift_evolve
PRO
1
720
生成AI時代におけるグローバル戦略思考
taka_aki
0
160
多様なデジタルアイデンティティを攻撃からどうやって守るのか / 20251212
ayokura
0
430
AI 駆動開発勉強会 フロントエンド支部 #1 w/あずもば
1ftseabass
PRO
0
340
今からでも間に合う!速習Devin入門とその活用方法
ismk
1
670
Playwrightのソースコードに見る、自動テストを自動で書く技術
yusukeiwaki
13
5.3k
A Compass of Thought: Guiding the Future of Test Automation ( #jassttokai25 , #jassttokai )
teyamagu
PRO
1
260
Lambdaの常識はどう変わる?!re:Invent 2025 before after
iwatatomoya
1
470
[JAWS-UG 横浜支部 #91]DevOps Agent vs CloudWatch Investigations -比較と実践-
sh_fk2
1
250
意外とあった SQL Server 関連アップデート + Database Savings Plans
stknohg
PRO
0
310
コンテキスト情報を活用し個社最適化されたAI Agentを実現する4つのポイント
kworkdev
PRO
0
560
Featured
See All Featured
Navigating Team Friction
lara
191
16k
Being A Developer After 40
akosma
91
590k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Balancing Empowerment & Direction
lara
5
800
Faster Mobile Websites
deanohume
310
31k
4 Signs Your Business is Dying
shpigford
186
22k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.8k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
What's in a price? How to price your products and services
michaelherold
246
13k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Reflections from 52 weeks, 52 projects
jeffersonlam
355
21k
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?