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
42
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
310
Code Reviews
janosgyerik
0
150
Playing with Yahoo! Pipes
janosgyerik
0
250
Cool features of GitHub
janosgyerik
0
1.3k
Time-saving tricks on the command line
janosgyerik
1
4.2k
Other Decks in Technology
See All in Technology
DMMの検索システムをSolrからElasticCloudに移行した話
hmaa_ryo
0
360
AIエージェントを導入する [ 社内ナレッジ活用編 ] / Implement AI agents
glidenote
1
150
進化する大規模言語モデル評価: Swallowプロジェクトにおける実践と知見
chokkan
PRO
3
450
[Journal club] Thinking in Space: How Multimodal Large Language Models See, Remember, and Recall Spaces
keio_smilab
PRO
0
110
datadog-incident-management-intro
tetsuya28
0
120
OPENLOGI Company Profile for engineer
hr01
1
46k
Open Table Format (OTF) が必要になった背景とその機能 (2025.10.28)
simosako
3
630
Observability — Extending Into Incident Response
nari_ex
2
740
設計に疎いエンジニアでも始めやすいアーキテクチャドキュメント
phaya72
26
17k
新米エンジニアをTech Leadに任命する ー 成長を支える挑戦的な人と組織のマネジメント
naopr
1
350
Kotlinで型安全にバイテンポラルデータを扱いたい! ReladomoラッパーをAIと実装してみた話
itohiro73
3
220
AIを使ってテストを楽にする
kworkdev
PRO
0
410
Featured
See All Featured
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.1k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
140
34k
A better future with KSS
kneath
239
18k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
253
22k
Java REST API Framework Comparison - PWX 2021
mraible
34
8.9k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.3k
GraphQLとの向き合い方2022年版
quramy
49
14k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.2k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.5k
[RailsConf 2023] Rails as a piece of cake
palkan
57
6k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.7k
How to Ace a Technical Interview
jacobian
280
24k
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?