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
コードレビュー自動化の最前線から
Search
Soutaro Matsumoto
March 25, 2018
Programming
19
9.9k
コードレビュー自動化の最前線から
Rails Developers Meetup 2018
https://railsdm.github.io/
Soutaro Matsumoto
March 25, 2018
Tweet
Share
More Decks by Soutaro Matsumoto
See All by Soutaro Matsumoto
Rubyの標準添付ライブラリを開発する
soutaro
2
140
Embedding it into Ruby code
soutaro
4
18k
Parsing RBS
soutaro
0
1.4k
Ruby programming with types in action
soutaro
4
860
IDE Development with Ruby
soutaro
4
1k
Ruby 3の新機能としての静的型検査の開発
soutaro
4
7.1k
An Introduction to Static Typing in Ruby 3
soutaro
3
380
The State of Ruby 3 Typing
soutaro
0
680
Ruby3 is a typed language
soutaro
0
350
Other Decks in Programming
See All in Programming
今からはじめるAndroidアプリ開発 2024 / DevFest 2024
star_zero
0
990
Full stack testing :: basic to basic
up1
1
920
事業成長を爆速で進めてきたプロダクトエンジニアたちの成功談・失敗談
nealle
3
1.4k
N.E.X.T LEVEL
pluu
2
290
第5回日本眼科AI学会総会_AIコンテスト_3位解法
neilsaw
0
160
MCP with Cloudflare Workers
yusukebe
2
200
17年周年のWebアプリケーションにTanStack Queryを導入する / Implementing TanStack Query in a 17th Anniversary Web Application
saitolume
0
240
テスト自動化失敗から再挑戦しチームにオーナーシップを委譲した話/STAC2024 macho
ma_cho29
1
1.2k
SymfonyCon Vienna 2025: Twig, still relevant in 2025?
fabpot
3
1.1k
Amazon Aurora Serverless v2のアプデと、Amazon Aurora PostgreSQL Limitless DatabaseのGAについて
satoshi256kbyte
0
120
The rollercoaster of releasing an Android, iOS, and macOS app with Kotlin Multiplatform | droidcon Italy
prof18
0
150
競技プログラミングで 基礎体力を身につけよう / You can get basic skills through competitive programming
mdstoy
0
170
Featured
See All Featured
Designing for Performance
lara
604
68k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.9k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
The Pragmatic Product Professional
lauravandoore
32
6.3k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Why Our Code Smells
bkeepers
PRO
335
57k
Site-Speed That Sticks
csswizardry
1
180
[RailsConf 2023] Rails as a piece of cake
palkan
53
5k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
95
17k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
111
49k
Optimising Largest Contentful Paint
csswizardry
33
3k
Transcript
ίʔυϨϏϡʔࣗಈԽͷ ࠷લઢ͔Β দຊफଠ !TPVUBSP
!TPVUBSP w দຊफଠ w 4JEF$*Λ։ൃ͍ͯ͠ΔʢޙͰ৮ΕΔʣ w 3VCZͷܕݕࠪثΛ࡞͍ͬͯΔʢࠓ৮Εͳ͍ʣ IUUQTHJUIVCDPNTPVUBSPTUFFQ
ίʔυϨϏϡʔ͍͠
None
ίʔυϨϏϡʔͷ͠͞ w ΊΜͲ͍͘͞ w ͕͔͔࣌ؒΔ w ਓؒؔ Ͱ͖Δ͚ͩػցʹΒ͍ͤͨ
ίʔυϨϏϡʔͱ w ͷ͋ΔίʔυΛݟ͚ͭͯमਖ਼͢ΔΑ͏ʹ͓ئ͍͢Δ w ιϑτΣΞΛϝϯςφϯε͍͢͠ঢ়ଶʹอͭ w ෆ۩߹Λݟ͚ͭΔ
ίʔυϨϏϡʔͷࣗಈԽ w ͳΜΒ͔ͷπʔϧͰɺΛൃݟͯ͠։ൃऀʹमਖ਼Λଅ͢ w ࣗಈϨϏϡʔͰશͯͷΛൃݟͰ͖ͳ͍ͷͰɺ࠷ऴత ʹਓ͕ؒ֬ೝ͢Δ w ͷ૯ྔมΘΒͳ͍͕ɺਓ͕ؒ֬ೝ͠ͳ͍ͱ͍͚ͳ ͍ͷྔ͕ݮΔ
ίʔυͷ w Ұൠతͳ w ෆదͳ໊લ w ׂ͕ඞཁͳίʔυ w ͗͢Δߦ w
ྑ͘ͳ͍நԽ w ϓϩδΣΫτݻ༗ͷ
ϓϩδΣΫτݻ༗ͷʢྫʣ
ϓϩδΣΫτݻ༗ͷʢྫʣ
ϓϩδΣΫτݻ༗ͷ w ҰൠతͳϕετϓϥΫςΟεͱҰக͠ͳ͍͠ɺໃ६͢Δ͜ ͱ͢Β͋Δ w ҰൠతͳͰͳ͍ͷͰɺϓϩδΣΫτʹؔ͘Θͬͯ ͍Δਓ͔͠Βͳ͍ w ద༻Ͱ͖Δൣғ͕ۃΊͯڱ͍
՝ w ։ൃΛԁʹਐΊΔͨΊͷϓϩδΣΫτݻ༗ͷϧʔϧɺ Ұൠతͳ-*/5πʔϧͰΧόʔͰ͖ͳ͍ w ϓϩδΣΫτͷʹͱͳͬͯେ͖ͳʹͳΔ w ৽͍͠ϝϯόʔ͕Ճೖͯ͠ཕΛ౿Ήճ͕૿͑Δ w Α͘Βͳ͍"1*ͷ͕૿͑Δ
ղܾํ๏ w 3VCP$PQʹ13͢Δ w 3VCP$PQͷϓϥάΠϯΛ࡞Δ
͍͍͍ w ҰൠతͳϓϩάϥϛϯάͷͰͳ͍ͷͰɺ13ͮ͠Β ͍ w ར༻ऀ͕ਓ͘Β͍͔͍͠ͳ͍ϓϥάΠϯͱ͔࡞Γͨ͘ͳ ͍͠ϝϯςφϯεͨ͘͠ͳ͍
3VCZϓϩάϥϛϯά͕͗͢͠Δ w ΄ͱΜͲͷ߹ಛఆͷ໊લͷࢀরΛݕग़Ͱ͖Εྑ͍ w ϓϩάϥϛϯά͠ͳ͍ͱղ͚ͳ͍Ͱͳ͍ͷʹɺ 3VCZͰॻ͘ͷແବͳίετ w ίετ͕ߴ͗͢ΔͷͰར༻ऀ͕ेʹଟ͘ͳ͍ͱ։ൃ ͍ͨ͠ؾ࣋ͪʹͳΒͳ͍
ղܾํ๏ w ؆୯ʹϧʔϧΛՃͰ͖Δ-*/5πʔϧΛ։ൃ͢Δ w ݕ͍ࠪͨ͜͠ͱࣗମ؆୯ͳͷͰɺখ͞ͳݴޠΛ࡞Δ ͜ͱͰ3VCZϓϩάϥϛϯά͠ͳͯ͘ରԠͰ͖Δ w ؆୯ʹϧʔϧ͕ՃͰ͖ΔͷͰΈΜͳϓϩδΣΫτຖ ʹϧʔϧΛ͡ΌΜ͡ΌΜՃ͢Δʢͣʣ
ਖ਼نදݱͱಉ͡ߏ w ਖ਼نදݱ੍ݶ͞Εͨϓϩάϥϛϯάݴޠ w จࣈྻ͕͋Δੑ࣭Λຬ͔ͨ͢Ͳ͏͔ΛݕࠪͰ͖Δ w ʮϝʔϧΞυϨεͬΆ͍ײ͔͡Ͳ͏͔ʯ w ͳΜͰͰ͖ΔΘ͚Ͱͳ͍͕ɺҰൠతͳϓϩάϥϛ ϯάݴޠΑΓ֮͑Δͷ͕؆୯
w ਖ਼نදݱͰࡁΉͳΒɺਖ਼نදݱͰࡁ·ͤΔํָ͕ͳ ͜ͱ͕ଟ͍
࡞ͬͨ $ gem install querly IUUQTHJUIVCDPNTPVUBSPRVFSMZ
rules: - id: com.sideci.env pattern: ENV message: | ڥมΛ͏ͱ͖ .env.sample
ʹ αϯϓϧΛೖΕ͍ͯͩ͘͞
rules: - id: com.sideci.env pattern: octokit() message: | octokit Ͱͳ͘ɺϦτϥΠͱ͔Λྑ͍ײ͡ʹ
ͬͯ͘ΕΔ with_octkit Λ͍·͠ΐ͏
ύλʔϯ w ҾΛ͏ϝιουݺͼग़͠ has_many(_, class_name: _, !inverse_of: _, ...) w
Ϩγʔόͷࢦఆ :string:.freeze() w ϒϩοΫͷ༗ແͷࢦఆ _.count() !{} w จ຺ save(!validate: false) [!conditional]
- id: com.sideci.link_to_with_method pattern: "link_to(..., method: _, ...)" message: |
GETҎ֎ΛϦϯΫͰ࣮͠ͳ͍Ͱ͍ͩ͘͞ formΛ͏͔ɺAjaxͰ໌ࣔతʹ࣮͠·͠ΐ͏ɻ
- id: com.sideci.with_octokit pattern: - "with_octokit(_)" message: with_octokit ༻ՄೳͳτʔΫϯΛ୳ͨ͢Ίɺ ͞ΕͨϒϩοΫΛϦτϥΠ͠·͢ɻ
ϒϩοΫϦτϥΠ͞Εͯྑ͍Α͏ʹͳ͍ͬͯ·͔͢ʁ justification: - ϒϩοΫ͕ϦτϥΠ͞Εͯͳ͍Α͏ʹ࣮͞Ε͍ͯΔ߹
- id: com.sideci.repository.full_name pattern: api_github_repository.full_name message: | GithubRepository#full_name Λ͍·͠ΐ͏ examples:
- before: repo.api_github_repository.full_name after: repo.full_name
- id: com.sideci.remove_column pattern: - 'remove_column(:symbol:, ...)' message: | ෳ߹ΠϯσοΫε͕ઃఆ͞Ε͍ͯΔΧϥϜΛআ͢Δࡍʹɺ
ઌʹΠϯσοΫεΛআ͢ΔΑ͏ʹ͍ͯͩ͘͠͞ examples: - before: "remove_column :organizations, :plan_id"
- id: com.sideci.pusher pattern: Pusher.trigger message: | Pusher.triggerΛ͏ͷΛΊ·͠ΐ͏ `PusherNotification` ʹΠϕϯτΛఆ͍ٛͯ͠·͠ΐ͏ɻ
`PusherNotification.trigger` ΤϥʔॲཧΛؚΜͰ͍·͢ɻ examples: - before: Pusher.trigger("#{user.id}", "reload-dashboard", {}) after: PusherNotification.new_repository_added(user)
- id: com.sideci.use_pluck pattern: "all.map(&:symbol:)" examples: - before: "Tool.all.map(&:id)" after:
"Tool.pluck(:id)" message: | ActiveRecordͰall.map(&:id)Λ͢ΔΑΓ pluck(:id)Λ͏ํ͕ߴͰ͢ɻ
͍ಓ w มͳ"1*ͷ͍ํΛ͍ͯͨ͠ΒࣤΔ w ʮTBWFͨ͠ΒฦΓΛ֬ೝ͠Α͏ʯ w "1*Λ%FQSFDBUF͢Δ w ʮ0K͏Θͳ͍Α͏ʹ͠·͠ΐ͏ʯ w
"1*ʹؔ͢ΔิใΛग़͢ w DPVOUͱTJ[Fͷҧ͍ w ʮXJUI@PDUPLJUϦτϥΠ͢Δ͔ΒCMPDLͷத࠶࣮ߦ͞ ΕͯյΕͳ͍Α͏ʹͯ͠Ͷʯ
ʹཱͭͷʁ w গͳ͘ͱ4JEF$*ࣾͰ͍ͬͯΔ w ΈΜͳؾܰʹϧʔϧΛՃ͍ͯ͠Δ w 13ΛϨϏϡʔ͍ͯͯ͠܁Γฦ͠ʹؾ͍ͮͨΒ2VFSMZʹ Ճ͢Δ w 13Λ࡞͍ͬͯͯɺͳʹ͔Λ%FQSFDBUF͍ͨ͠ͱ͖ʹ
2VFSMZʹՃ͢Δ w ਫ਼ѱ͍͚Ͳɺؾʹ͠ͳ͍
ਫ਼͕ѱ͍ w ໊લͰϚονϯά͍ͯ͠Δ͚ͩͳͷͰɺGBMTFQPTJUJWF͕ଟ͍ ˠҙਤ͞ΕͨσβΠϯ w ϧʔϧΛؾܰʹՃͰ͖Δ͜ͱͷํ͕େ w ʮࡶʹϧʔϧΛՃͯ͠ɺࡶʹݕࠪ͢Δʯ w ϊΠζରࡦͦͷ্ͷϨΠϠͰؤுΔ
w 13Ͱมߋͨ͠ͱ͜Ζ͚ͩΛදࣔͯ͠ઈରΛݮΒ͢ w 044 SFWJFXEPH ͰΔ͔ɺۚͰԥΔ 4JEF$*
sideci.com
·ͱΊ w ϓϩδΣΫτݻ༗ͷϧʔϧΛؾܰʹՃͯ͠ɺίʔυϨ ϏϡʔΛޮԽ͠Α͏ w HFNJOTUBMMRVFSMZ w 2VFSMZΛ͏ͳΒ4JEF$*ʢ3VCP$PQ͑Δʂʣ w HFNΛ࡞Δͱ͖ʹ:PVUVCFSͱͷ໊લͷিಥʹҙ͢Δ