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
270
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
エンジニアリング戦略の作り方 / Crafting Engineering Strategy
iwashi86
21
7k
Kiro Ambassador を目指す話
k_adachi_01
0
100
気づかぬうちにセキュリティ負債を生むAPIキー運用
sgwrmctk
0
170
アジャイルな経理と Claude Code と経営の未来
kawaguti
PRO
3
150
あなたの知らないPDFのアクセシビリティ
lycorptech_jp
PRO
0
210
[チョークトーク資料]AWS DevOps Agent を使いこなす / AWS Dev Ops Agent Chalk Talk AWS Summit Japan 2026
kinunori
1
360
【2026年版】 ベクトル検索とEmbedding最前線
mocobeta
10
3k
Oracle AI Database@Azure:サービス概要のご紹介
oracle4engineer
PRO
6
2k
2026TECHFRESH畢業分享會 - 原生還是跨平台? App 開發踩坑實錄
line_developers_tw
PRO
0
1.2k
ACE-Step-1.5で見る 音楽生成AIのしくみと“破綻だけ直す”Retake機能の開発【zennfes spring 2026 登壇資料】
personabb
1
520
LayerX コーポレートエンジニアリング室におけるサプライチェーンセキュリティへの取り組み / Supply Chain Security at LayerX Corporate Engineering
yuyatakeyama
2
650
自律型AIエージェントは何を破壊するのか
kojira
0
160
Featured
See All Featured
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
How to build a perfect <img>
jonoalderson
1
5.7k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
250
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
160
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
250
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.6k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
250
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.6k
Making Projects Easy
brettharned
120
6.7k
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?