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
Beyond the RuboCop Defaults
koic
3
2.7k
Minify Ruby Code
koic
2
2.1k
Permanent Agility
koic
37
7.5k
RuboCop: LSP and Prism
koic
3
4.1k
Organizational Pattern Hatching
koic
0
1.5k
A Practitioner's Journey from Ruby 1.8 to Present
koic
1
2k
A Story Featuring Right Hand Archetype
koic
0
1.1k
Without Practice, No Emergence
koic
4
2.4k
The Resurrection of the Fast Parallel Test Runner
koic
1
6.2k
Other Decks in Programming
See All in Programming
アジャイルを支えるテストアーキテクチャ設計/Test Architecting for Agile
goyoki
9
3.3k
距離関数を極める! / SESSIONS 2024
gam0022
0
280
macOS でできる リアルタイム動画像処理
biacco42
9
2.4k
Webの技術スタックで マルチプラットフォームアプリ開発を可能にするElixirDesktopの紹介
thehaigo
2
1k
EventSourcingの理想と現実
wenas
6
2.3k
광고 소재 심사 과정에 AI를 도입하여 광고 서비스 생산성 향상시키기
kakao
PRO
0
170
Better Code Design in PHP
afilina
PRO
0
120
CSC509 Lecture 12
javiergs
PRO
0
160
CSC509 Lecture 11
javiergs
PRO
0
180
色々なIaCツールを実際に触って比較してみる
iriikeita
0
330
Jakarta EE meets AI
ivargrimstad
0
510
PHP でアセンブリ言語のように書く技術
memory1994
PRO
1
170
Featured
See All Featured
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
Code Review Best Practice
trishagee
64
17k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Done Done
chrislema
181
16k
How STYLIGHT went responsive
nonsquared
95
5.2k
The Pragmatic Product Professional
lauravandoore
31
6.3k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
Embracing the Ebb and Flow
colly
84
4.5k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Agile that works and the tools we love
rasmusluckow
327
21k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
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ͷֶΛຬͤ͞Β ΕΔ पͷઌʹ͚ۭͨ
ͦΕͧΕͷՖ͋Γ ָͯͦ͜͠💐
ॕप🎉