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
Streams APIとTCPフロー制御 / Web Streams API and TCP flow control
tasshi
2
360
TypeScriptでライブラリとの依存を限定的にする方法
tutinoko
3
720
Jakarta EE meets AI
ivargrimstad
0
330
見せてあげますよ、「本物のLaravel批判」ってやつを。
77web
7
7.8k
ActiveSupport::Notifications supporting instrumentation of Rails apps with OpenTelemetry
ymtdzzz
1
250
Figma Dev Modeで変わる!Flutterの開発体験
watanave
0
150
Duckdb-Wasmでローカルダッシュボードを作ってみた
nkforwork
0
130
Functional Event Sourcing using Sekiban
tomohisa
0
110
WebフロントエンドにおけるGraphQL(あるいはバックエンドのAPI)との向き合い方 / #241106_plk_frontend
izumin5210
4
1.4k
TypeScript Graph でコードレビューの心理的障壁を乗り越える
ysk8hori
3
1.2k
CSC509 Lecture 11
javiergs
PRO
0
180
初めてDefinitelyTypedにPRを出した話
syumai
0
430
Featured
See All Featured
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Designing the Hi-DPI Web
ddemaree
280
34k
The Language of Interfaces
destraynor
154
24k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
720
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Speed Design
sergeychernyshev
25
620
Teambox: Starting and Learning
jrom
133
8.8k
A Tale of Four Properties
chriscoyier
156
23k
Agile that works and the tools we love
rasmusluckow
327
21k
GraphQLとの向き合い方2022年版
quramy
43
13k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
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ͷֶΛຬͤ͞Β ΕΔ पͷઌʹ͚ۭͨ
ͦΕͧΕͷՖ͋Γ ָͯͦ͜͠💐
ॕप🎉