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
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
BPaaSオペレーション・kubell社内 n8n活用による効率化検証事例紹介
kubell_hr
0
160
ファインディにおけるフロントエンド技術選定の歴史
puku0x
2
1.6k
サラリーマンソフトウェアエンジニアのキャリア
yuheinakasaka
42
20k
The Engineer with a Three-Year Cycle - 2
e99h2121
0
160
BPaaSオペレーション・kubell社内 n8n活用による効率化検証事例紹介
kentarofujii
0
260
Claude in Chromeで始める自律的フロントエンド開発
diggymo
1
250
Databricks Free Editionで始めるLakeflow SDP
taka_aki
0
180
20260114_データ横丁 新年LT大会:2026年の抱負
taromatsui_cccmkhd
0
370
Agentic Coding 実践ワークショップ
watany
35
24k
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
6
64k
AI アクセラレータチップ AWS Trainium/Inferentia に 今こそ入門
yoshimi0227
1
310
クラウドセキュリティの進化 — AWSの20年を振り返る
kei4eva4
0
150
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
58
42k
How to make the Groovebox
asonas
2
1.9k
Typedesign – Prime Four
hannesfritz
42
2.9k
Making the Leap to Tech Lead
cromwellryan
135
9.7k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
340
Agile that works and the tools we love
rasmusluckow
331
21k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.1k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
140
Become a Pro
speakerdeck
PRO
31
5.8k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
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?