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
2
460
Minify Ruby Code
koic
2
2k
Permanent Agility
koic
35
7.1k
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
Other Decks in Programming
See All in Programming
Iteratorでページネーションを実現する
sonatard
3
690
"noncopyable types" の使いどころについて考えてみた
andpad
0
110
Remix × Cloudflare Pages × Sentry 奮闘記 / remix-pages-sentry
nkzn
1
350
◯◯エンジニアになった理由
gessy0129
PRO
0
550
Делим тесты между QA и разработчиком
mariyasaygina
0
440
AWS CDKを用いたセキュアなCI/CDパイプラインの構築 / Build a secure CI/CD pipeline using AWS CDK
seike460
PRO
3
490
Go製CLIツールGatling Commanderによる負荷試験実施の自動化
okmtz
3
610
Removing Corepack
yosuke_furukawa
PRO
9
960
What is TDD?
urakawa_jinsei
1
190
GitHub Copilot Workspace で我々のアプリ開発がどう変わるのか?
shuyakinjo
0
830
Pythonによるイベントソーシングへの挑戦と現状に対する考察 / Challenging Event Sourcing with Python and Reflections on the Current State
nrslib
3
780
全方位強化 Python 服務可觀測性:以 FastAPI 和 Grafana Stack 為例
blueswen
1
360
Featured
See All Featured
Music & Morning Musume
bryan
46
6.1k
Being A Developer After 40
akosma
84
590k
No one is an island. Learnings from fostering a developers community.
thoeni
19
2.9k
Learning to Love Humans: Emotional Interface Design
aarron
271
40k
A Philosophy of Restraint
colly
202
16k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
166
48k
From Idea to $5000 a Month in 5 Months
shpigford
380
46k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
5
170
It's Worth the Effort
3n
182
27k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
109
6.9k
Product Roadmaps are Hard
iamctodd
PRO
48
10k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
28
1.7k
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ͷֶΛຬͤ͞Β ΕΔ पͷઌʹ͚ۭͨ
ͦΕͧΕͷՖ͋Γ ָͯͦ͜͠💐
ॕप🎉