Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Otemachi.rb #9 RuboCop

Ryo Nonoyama
September 18, 2018

Otemachi.rb #9 RuboCop

大手町.rb #9 にてRuboCopについて発表した際のスライドです。
簡単なRuboCopの紹介と、実際にRuboCopを導入しているリポジトリの運用経験から学んだことをまとめました。

Otemachi.rb #9
https://enechange-meetup.connpass.com/event/99946/

RuboCop Docs
https://rubocop.readthedocs.io/en/latest/

Ryo Nonoyama

September 18, 2018
Tweet

More Decks by Ryo Nonoyama

Other Decks in Programming

Transcript

  1. . #

  2.   • 3ZP/POPZBNB • -JRVJE *OD JOେखொ • 3VCZ3BJMT

    d • ւ֎޲͚ੜମೝূܾࡁαʔϏε։ൃ
  3. 

  4.   • 3VCZͰॻ͔ΕͨίʔυΛ੩తղੳͯ͘͠ΕΔπʔϧ IUUQTHJUIVCDPNSVCPDPQIRSVCPDPQ • ओʹҎԼͷ෼ྨ͝ͱʹղੳ݁ՌΛϑΟʔυόοΫͯ͘͠ΕΔ • 4UZMF •

    ίʔυελΠϧͷҰ؏ੑ͕͋Δ͔ʁ • ଟ͘ͷϧʔϧ͸3VCZ4UZMF(VJEFʹج͍͍ͮͯΔ • -JOU • ᐆດͳίʔυ΍ɺΤϥʔΛىͦ͜͠͏ίʔυ͕ͳ͍͔ʁ • .FUSJDT • ϝιουͷ௕͞ͳͲ͕ᮢ஋Λ௒͑ͯͳ͍͔ʁ
  5.       • ࣗಈͰίʔυΛमਖ਼͢Δػೳ • ༗ޮͳέʔεͱɺແޮͳέʔε͕͋Δ

    • 4UZMFׂ͘Β͍  • -JOUׂ͘Β͍  • .FUSJDT͢΂ͯແޮ  3VCPDPQυΩϡϝϯτ͔ΒҾ༻ɿ͋ΔέʔεͷྫɻσϑΥϧτͰ༗ޮ͕ͩɺࣗಈमਖ਼ʹ͸ඇରԠ IUUQTSVCPDPQSFBEUIFEPDTJPFOMBUFTUDPQT@NFUSJDTNFUSJDTMJOFMFOHUI
  6. SVCPDPQҎ֎ʹ΋ɺίʔυͷ੩తղੳΛͯ͘͠ΕΔϥΠϒϥϦ͕͋Δ • IBNMMJOUTMJNMJOU • )5.-UFNQMBUFFOHJOF༻ • TDTTMJOU • 4$44༻ •

    SBJMT@CFTU@QSBDUJDFT • 3BJMTʹಛԽ • CSBLFNBO • ηΩϡϦςΟ؍఺ • DPGGFFMJOU • $PGGFF4DSJQU༻
  7.     • 3BJMTͰࣗಈੜ੒͞ΕΔίʔυ • ECTDIFNBSC • ECNJHSBUF

     • ECGJYUVSFT  • υϝΠϯ֎ͷίʔυ΍࣮ߦϑΝΠϧ • CJO • MJC • WFOEPS 
  8.     .FUSJDT"CD4J[F σϑΥϧτ  ͰؤுΖ͏ͱ͕ͨ͠ ϦϑΝΫλ͕ݫ͍ͨ͠Ίʹɻ ͦͷޙʹɺ8BSOJOH๾໓࡞ઓʹΑͬͯGBMTFԽɻ

    .FUSJDT $ZDMPNBUJD$PNQMFYJUZ ͜Ε΋8BSOJOH๾໓࡞ઓʹΑͬͯGBMTFԽʜ .FUSJDT 1FSDFJWFE$PNQMFYJUZ .FUSJDT999-FOHUI 4UZMF#MPDL%FMJNJUFST 3TQFDܥͷϑΝΠϧ͸ର৅͔Βআ֎ɻ ಡΈ΍͢͞Λߟྀɻ
  9. 6 2 • ظؒ • ೥݄ʙ೥্݄०͘Β͍ • ର৅ • SVCPDPQ

    IBNMMJOU TDTTMJOU DPGGFFMJOU  CSBLFNBO SBJMT@CFTU@QSBDUJDFT • ૯਺ •   ճ
  10. 2 2 ճ -JOFJTUPPMPOH 4UZMF-JOF-FOHUI ճ 1SFGFSTJOHMFRVPUFETUSJOHTXIFOZPVEPOUOFFETUSJOH JOUFSQPMBUJPOPSTQFDJBMTZNCPMT 4UZMF4USJOH-JUFSBMT ճ

    "MJHOYYY 4UZMF"MJHO1BSBNFUFST -BZPVU#MPDL"MJHONFOU FUDʜ ճ *ODPSSFDUJOEFOUBUJPOEFUFDUFE 4UZMF$PNNFOU*OEFOUBUJPO ճ .JTTJOHTQBDFBGUFS 4UZMF4QBDF*OTJEF#MPDL#SBDFT ճ 3FEVOEBOUDVSMZCSBDFTBSPVOEBIBTIQBSBNFUFS 4UZMF#SBDFT"SPVOE)BTI1BSBNFUFST
  11.     3VCPDPQ 4UZMF(VBSE$MBVTF 6TFBHVBSEDMBVTFJOTUFBEPGXSBQQJOHUIF DPEFJOTJEFBDPOEJUJPOBMFYQSFTTJPO • ৚݅෼ذͷ෦෼͸ɺ

    ෳࡶʹͳΕ͹ͳΔ΄ ͲόάͷԹচʹ • ͏͔ͬΓJGFMTFͰω ετΛਂ͕ͪ͘͠ • ΨʔυઅΛ࢖ͬͯɺ ৚݅෼ذͷωετΛ ઙ͘ɺγϯϓϧʹ͠ ͍ͯ͘
  12. 3 2 - • 3VCZΒ͍͠ίʔσΟϯάͷ͓࡞๏Λɺઌਓ͕ੵΈॏͶͨ ஌ܙΛआΓֶͯ΂Δ͜ͱ • 3VCP$PQͷϦϑΝϨϯεோΊͯΔ͚ͩͰ΋;Ή;Ήͬͯ ͳָ͍ͬͯ͠ʢݩؾͳͱ͖͸ʣ •

    ࣗવͱؾΛ͚ͭΔϙΠϯτ͕਎ʹ͍ͭͯɺ҆৺ͯ͠ίʔυ ͕ॻ͚ΔΑ͏ʹͳͬͨ͜ͱ " $#!   
  13.