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
RuboCop Philosophy
Search
Koichi ITO
February 25, 2023
Programming
2
1.9k
RuboCop Philosophy
プログラミング言語Ruby 30周年イベント ライトニングトーク
https://30.ruby.or.jp/
Koichi ITO
February 25, 2023
Tweet
Share
More Decks by Koichi ITO
See All by Koichi ITO
Minify Ruby Code
koic
2
1.7k
Permanent Agility
koic
35
6.9k
RuboCop: LSP and Prism
koic
3
3.9k
Organizational Pattern Hatching
koic
0
1.4k
A Practitioner's Journey from Ruby 1.8 to Present
koic
1
1.9k
A Story Featuring Right Hand Archetype
koic
0
1.1k
Without Practice, No Emergence
koic
4
2.3k
The Resurrection of the Fast Parallel Test Runner
koic
1
6k
Software Craftsmanship against Nova Era
koic
0
1.6k
Other Decks in Programming
See All in Programming
GraphQLの魅力を引き出すAndroidクライアント実装
morux2
3
310
Scala アプリケーションのビルドを改善してデプロイ時間を 1/4 にした話 | How I improved the build of my Scala application and reduced deployment time by 4x
nomadblacky
1
150
大公開!iOS開発の悩みトップ5 〜iOSDC Japan 2024〜
ryunakayama
0
190
労務ドメインを快適に開発する方法 / How to Comfortably Develop in the Labor Domain
yuki21
1
250
Debugging: All you need to know (for simultaneous interpreting)
jmatsu
2
450
Amazon BedrockでサーバレスなAIお料理ボットを作成する!!
tosuri13
0
190
Kotlin 2.0が与えるAndroid開発の進化
masayukisuda
1
260
事業フェーズの変化に対応する 開発生産性向上のゼロイチ
masaygggg
0
160
Go1.23で入った errorsパッケージの小さなアプデ
kuro_kurorrr
2
310
長期運用プロダクトの開発速度を維持し続けるためのリファクタリング実践例
wataruss
8
2.7k
マルチモジュールにおけるテスト最適化
fxwx23
0
190
いつか使える ObjectSpace / Maybe useful ObjectSpace
euglena1215
2
130
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
38
9.1k
Designing on Purpose - Digital PM Summit 2013
jponch
113
6.8k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Large-scale JavaScript Application Architecture
addyosmani
508
110k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
354
29k
Art, The Web, and Tiny UX
lynnandtonic
294
20k
Building an army of robots
kneath
302
42k
GraphQLとの向き合い方2022年版
quramy
43
13k
Imperfection Machines: The Place of Print at Facebook
scottboms
263
13k
Docker and Python
trallard
39
3k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
502
140k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
166
48k
Transcript
3VCP$PQϝϯςφʔ͙͠͞ RuboCop Philosophy ϓϩάϥϛϯάݴޠ3VCZपه೦Πϕϯτ 4BU ҏ౻ߒҰ&4. *OD
େࣄͳ͜ͱ ࠷ॳʹ
ॕप🎉
@koic w044ϓϩάϥϚʔ w3VCP$PQίΞνʔϜ wגࣜձࣾӬγεςϜϚωδϝϯτ &4. *OD ΤϯδχΞϦϯάϚωʔδϟʔ݉ σΟεςΟϯάΠογϡυΤϯδχΞ
None
044ίϛϡχςΟͱͷڞੜΛࢧԉ 3BJMT044ύονձ #esm_oss
None
w +BWB4DSJQU1SFUUJFS &4-JOU w (P(PGNU w 3VTU3VTUGNU $MJQQZ w 3VCZ3VCP$PQ
4UBOEBSE BOE PUIFST ϦϯλʔϑΥʔϚολʔͷੈք
None
.F
IUUQTSBJMTIPTUJOHDPNXIJDISVCZHFNTEPZPVMPWF
IUUQTSBJMTIPTUJOHDPNXIJDISVCZHFNTGSVTUSBUFZPVUIFNPTU
None
ࠓͷ
3VCP$PQDPSFEFWFMPQFST +0900 UTC+0200 +0300 +0800 -0400 ։ൃऀʹΑͬͯߟ͑Έͷҧ͍͕͋Δ ͳͷͰ͜ͷൃදࢲݸਓͷݟղͰ͢
None
࣍ ੜͱֶ ϐϥϛουͱࣗಈԽ ϝϯςφʔ͙͠͞
ੜͱֶ
w 3VCZ݄ੜ·Ε w IUUQTCMBEFSVCZMBOHPSHSVCZMJTU w 3BJMT݄ʹΞφϯε w IUUQTCMBEFSVCZMBOHPSHSVCZUBML w 3VCP$PQ݄ʹTUίϛοτ
w IUUQTHJUIVCDPNSVCPDPQSVCPDPQDPNNJUBGCFBE 3VCZ 3BJMT 3VCP$PQͷੜ
w 3VCZप w ॊೈͳදݱྗΛඋ͑ͯɺϓϩάϥϛϯάΛ ָ͘͢͠Δ 3VCZJTUʹͤΛ͜Ϳ ݴޠ w 3VCP$PQࡢप w
3VCZͱ͓Αͦࡀࠩ 3VCZͱ3VCP$PQ
Λ౿·͑ͨެֶࣜ IUUQTEPDTSVCPDPQPSHSVCPDPQJOEFYIUNMQIJMPTPQIZ
w 3VCP$PQ3VCZ4UZMF(VJEFͷϥϯλΠϜ࣮ w ॳظʹࢦͨ͠ͷHPGNUతͳେ౷ҰϑΥϚολʔ w 3VCZίϛϡχςΟʹڝ߹͢ΔελΠϧΈ͕͋Δ͜ ͱʹؾͮ͘ FHμϒϧΫΥʔτɺγϯάϧΫΥʔτ w
ҰൠతͳελΠϧΛߏՄೳʹ͢ΔΑ͏ʹͳΔ w ελΠϧΨΠυΛσϑΥϧτͱͭͭ͠ɺΈͷҧ͍Λड ͚ೖΕΔͱ͍͏ֶʹجͮ͘Α͏ʹͳΔ 3VCP$PQͷֶαϚϦʔ
Έͷҧ͍Λड͚ ೖΕΔͱ͍͏ֶ
ϐϥϛουͱࣗಈԽ
3VCZίϛϡχςΟͱ ίʔσΟϯάελΠϧ
ੜͷϢʔβʔ ϕςϥϯ͔Β ϏΪφʔ·Ͱ෯͍
ࢲ ͨͪ ͷߟ͑ͨ ࠷ڧ͋Δ͍࠷Ѫͷ ελΠϧଟ
ڷʹೖΕ ڷʹै͑ ίʔσΟϯάελΠϧʹݴ͑Δ͜ͱ
ಛʹࣄͰେਓ ʹͳΔඞཁ͕͋Δ
ϓϩδΣΫτ ࣄ ελΠϧϐϥϛου ݖҖͷελΠϧΨΠυ ࣗͷελΠϧ ϓϩδΣΫτͷελΠϧ͕͓͔͔ͬͨ͠ΒԼࠀ্͕ى͖͏Δ ͋͑ͯϧʔϧΛઃ͚ͳ͍PSߟྀ͞Εͣ Ѫ ܟҙ कഁ
PSແ ϑϦʔμϜ δϟεςΟε ϓϩδΣΫτϧʔϧ༏ઌͰ ϧʔϧ͕ͳ͚Ε ϑΥʔϧόοΫ͞Ε͍ͯ͘ $IBPT -BX
͞Γ͞Γͱͯ1SPCMFNWT64 IUUQTUXJUUFSDPNPOLTUBUVT
None
IUUQTSBJMTIPTUJOHDPNXIJDISVCZHFNTEPZPVMPWF
IUUQTSBJMTIPTUJOHDPNXIJDISVCZHFNTGSVTUSBUFZPVUIFNPTU
σϑΥϧτ͕͍ ͮΒ͍͕ߏ͢Δ ͷ໘ͱ͍͏
w σϑΥϧτ͕ݫ͗͢͠Δ w ݫ͍͠కΊ͚͕ྑ͍ͱ͍͏͋Δ w σϑΥϧτͰબ͞ΕͨελΠϧ͕͋Θͳ͍ w ରۃ͕࣠͋Δͷ͍͠ɻྫ͑γϯάϧΫΥʔτͱμϒϧ ΫΥʔτͷ߅૪ऴΘΒͳ͍ɻ3VCZ͕͖ͳͷΘ͔ͬͨɻ w
σϑΥϧτͰ༗ޮͷϧʔϧ͕ଟ͗͢Δ w ͜Εͦ͏ɻؤுͬͯݮΒ͢׆ಈΛ͍ͯ͠Δ͕ɺ͍ͨΜɻ σϑΥϧτͷݱ࣮ͷ
͍ͪͲσϑΥϧτʹ ͳͬͨͷखڧ͍
None
ϝϯςφʔ͙͠͞
."/"48"/ ͷෛ୲ΛݮΒ͢ ඞཁҎ্ͷΧελϚΠζઃఆ
w ཧͱ͢ΔσϑΥϧτ5IF3BJMT%PDUSJOF ͷʮ5IFNFOVJTPNBLBTFʯͷੈք؍ w ͍͍ͩͨͷ߹σϑΥϧτͰ͏·͍͘͘ w ͨ·ʹ ͋Θͳ͍෦ΧελϚΠζͰ͖Δ શͯԕ͖ཧڷ
Ͳ͏͍͏ߟ͑ํʹ ࢲج͍ͮͯΔʁ
w ίϯτϦϏϡʔλͷ Ϛʔδͷ ຬײ Ͱͳ͘ɺϓϩμΫτͷϢʔβʔͷ͍উ खΛॏࢹ͢Δ w ͨͱ͑ಛఆͷϓϩδΣΫτͷΈ͕σϑΥ ϧτ͖ͱݶΒͳ͍ $PQDPQͱ͍͏ϝλ׆ಈ🚨
Ϋϩʔζ৺ॏ͍Ͱ͕͢Ϣʔβʔͷ൵໐Λ͙ͷΛ༏ઌ
ਓدΓʁࢻਓدΓʁ ਓ ࢻਓ w νʔϜ։ൃ w ݎ͍ن w ౷Ұੑͷ९क w
ݸਓ։ൃ w ؇͍ن w ଟ༷ͷड͚ೖΕ ߹͍
ࢲࣗͷࣗݾੳ ਓ ࢻਓ w νʔϜ։ൃ w ݎ͍ن w ౷Ұੑͷ९क w
ݸਓ։ൃ w ؇͍ن w ଟ༷ͷड͚ೖΕ ߹͍
ࢲͷֶ ਓ ࢻਓ w ͬͱࣗ༝͕͋Δͱࣗવຯ ָ͠͞ ͋Δ w σϑΥϧτϧʔϧͬͱ؇ͯ͘ྑ͍ w
ʮݫ͗͢͠ͳʯϧʔϧͷఏҊ͓فΓ͢Δ ߹͍
w ϧʔϧͱͯ͠ݫ͗͢͠Δ w ಠࣗϧʔϧײ͕ڧ͍ w ِཅੑ͕ଟ͍͜ͱ͕ࣗ໌ͳͷ w ϚʔδޙʹϢʔβʔͷ൵໐͕େ͖ͦ͏ͳͷ ίΞʹड͚ೖΕʹ͍͘ϧʔϧ ίΞͰͳ͘SEύʔςΟʔͰͷެ։ΛΊ͍ͯΔ
େ౷ҰͰ͖Δ͔ ਓ ࢻਓ w ελΠϧͰΈ͕͔ΕΔ w ਓࢻਓͷ߹͍͕։ൃऀ͝ͱʹҟͳΔ w ͳΜͳΒ3VCZίϛολʔͰҟͳ͍ͬͯͨ ߹͍
3VCP$PQDPSFEFWFMPQFST +0900 UTC+0200 +0300 +0800 -0400 ։ൃऀʹΑΔߟ͑Έͷҧ͍Λௐఀ͢Δ 3VCZJTUͷ͚ͩελΠϧͷΈ͕ੜ·ΕΔ
None
" ࠷ߴͷ$PQΛٻΊͯ
w ϓϩάϥϚʔͷϝϞϦཧ͔ॲཧܥͷ($ͷ Ͱͳ͘ɺίϯύΠϥͰϝϞϦཧΛղܾ ͢Δ3VTUͷಓ w ੩తܕ͚ͷܕԸܙ͔ಈతܕ͚ͷखܰ͞ͷ Ͱͳ͘ɺܕఆٛϑΝΠϧͰ྆औΓΛࢦ ͢3#4ͷಓ ୈࡾͷղܾ
w HPGNUͷΑ͏ͳҰϑΥʔϚοτͱϢʔβʔ ΧελϜͷߏͷͰͳ͘ɺͳΜͱͳ͘ ೲಘײͷ͋Δʮ͍͍ͩͨ͏·͍͘͘ߏʯ w 3VCP$PQͰݕ౼͞ΕͯΔϓϦηοτ͕ͦΕ ʹ͍͕ۙʮ୭͔ͷዞҙੑʯ͔Βൈ͚ग़ͤͳ͍ 3VCP$PQͰୈࡾͷղܾ
Ѫ͋Δዞҙੑ͕ ղܾͷಓʁ
w ίϛϡχςΟͷҙࢥܾఆͱผʹ༏͍͠ಠࡋऀͷΑ ͏ͳݸਓʹΑΔҙࢥܾఆϞσϧ w ੨ๆ͞Μͷʮ3VCZͷίʔσΟϯάελΠϧʯ w લాमޗ͞Μͷʮ3VCZίʔσΟϯάنʯ w ۩ମతͳʮಛఆͷ୭͔ʯॏཁͰʁ FH0OL$PQ
ଥͦ͏ͳʮ୭͔ʯϧʔϧʁ
w ͍͍ͩͨ͏·͍͖ͦ͘͏ʁ .BU[$PQ
w ·ͭͱ͞Μम w 3VCZͷͱ͍͏͜ͱѪੈքҰ w DisabledByDefault: trueϕʔεͷ֦ுHFN
w ϧʔϧ $PQ ແݶʹ૿͍͍͑ͯͬͯΔͷͰɺ ϛχϚϜͷελʔλʔΩοτΑ͏ͳͷʹͳΓ ͦ͏ .BU[$PQͷ͝ఏҊ
w େਓʹͳͬͨ3VCZΛݟकΔ.BU[$PQͷΑ͏ͳݖ ҖͷσϑΥϧτ͕͋Δͱͤͳ3VCZJTU͍ͦ͏ w ͱ͍͑ϧʔϧͷऔࣺબ͕͍ͨΜͦ͏ w 3VCP$PQϓϩμΫτͱͯ͠αϙʔτελΠϧ ͷͻͱͭͱݟ၏͠3VCP$PQͷֶΛຬͤ͞Β ΕΔ पͷઌʹ͚ۭͨ
ͦΕͧΕͷՖ͋Γ ָͯͦ͜͠💐
ॕप🎉