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
Carving the Way to Ruby Engineering
koic
3
510
Beyond the RuboCop Defaults
koic
3
3.1k
Minify Ruby Code
koic
2
2.2k
Permanent Agility
koic
37
7.7k
RuboCop: LSP and Prism
koic
3
4.2k
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
Other Decks in Programming
See All in Programming
Amazon S3 NYJavaSIG 2024-12-12
sullis
0
110
CloudflareStack でRAGに入門
asahiiwm
0
130
各クラウドサービスにおける.NETの対応と見解
ymd65536
0
210
PHPカンファレンス 2024|共創を加速するための若手の技術挑戦
weddingpark
0
100
Scalaから始めるOpenFeature入門 / Scalaわいわい勉強会 #4
arthur1
1
360
선언형 UI에서의 상태관리
l2hyunwoo
0
230
バグを見つけた?それAppleに直してもらおう!
uetyo
0
190
週次リリースを実現するための グローバルアプリ開発
tera_ny
1
110
テストコード書いてみませんか?
onopon
2
240
LLM Supervised Fine-tuningの理論と実践
datanalyticslabo
7
1.6k
採用事例の少ないSvelteを選んだ理由と それを正解にするためにやっていること
oekazuma
2
1.1k
数十万行のプロジェクトを Scala 2から3に完全移行した
xuwei_k
0
400
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
Raft: Consensus for Rubyists
vanstee
137
6.7k
Fashionably flexible responsive web design (full day workshop)
malarkey
406
66k
GraphQLとの向き合い方2022年版
quramy
44
13k
Keith and Marios Guide to Fast Websites
keithpitt
410
22k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.6k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
28
4.4k
Building Your Own Lightsaber
phodgson
103
6.1k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.1k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
The Cult of Friendly URLs
andyhume
78
6.1k
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ͷֶΛຬͤ͞Β ΕΔ पͷઌʹ͚ۭͨ
ͦΕͧΕͷՖ͋Γ ָͯͦ͜͠💐
ॕप🎉