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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
OWASP Top 10:2025 リリースと 少しの日本語化にまつわる裏話
okdt
PRO
3
830
AI駆動開発を事業のコアに置く
tasukuonizawa
1
340
OpenShiftでllm-dを動かそう!
jpishikawa
0
140
Cloud Runでコロプラが挑む 生成AI×ゲーム『神魔狩りのツクヨミ』の裏側
colopl
0
120
~Everything as Codeを諦めない~ 後からCDK
mu7889yoon
3
470
Amazon Bedrock Knowledge Basesチャンキング解説!
aoinoguchi
0
160
こんなところでも(地味に)活躍するImage Modeさんを知ってるかい?- Image Mode for OpenShift -
tsukaman
1
170
SREチームをどう作り、どう育てるか ― Findy横断SREのマネジメント
rvirus0817
0
330
外部キー制約の知っておいて欲しいこと - RDBMSを正しく使うために必要なこと / FOREIGN KEY Night
soudai
PRO
12
5.6k
Bedrock PolicyでAmazon Bedrock Guardrails利用を強制してみた
yuu551
0
260
量子クラウドサービスの裏側 〜Deep Dive into OQTOPUS〜
oqtopus
0
140
顧客との商談議事録をみんなで読んで顧客解像度を上げよう
shibayu36
0
280
Featured
See All Featured
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.1k
Embracing the Ebb and Flow
colly
88
5k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.4k
Claude Code のすすめ
schroneko
67
210k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
650
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
98
Everyday Curiosity
cassininazir
0
130
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
It's Worth the Effort
3n
188
29k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Raft: Consensus for Rubyists
vanstee
141
7.3k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3k
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?